Click to See Complete Forum and Search --> : Q:How to insert mutiple rows with insert...values statement?


Bler
May 19th, 2006, 06:35 AM
I need to insert two rows at the same time in a table.
At the moment i am inserting just one with the insert... values statement.However after inserting a row i want to insert another one with different values .The code i have at the moment is smth like this:

BEGIN
INSERT INTO table( column1,column2,... ) values ( value1,value2,...)
END

How can 2 inserts be done right after each other?I am new to SQL and any help will be greatly appreciated.Thank you in advance!
B.

DanielaTm
May 19th, 2006, 09:31 AM
you can do it using 2 insert..values in a transaction,
or use insert..select