Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Multiple Rows

Status
Not open for further replies.

testeng

Technical User
Apr 5, 2001
32
US
Hi,
Can some one tell me why this statement will not work I have tried it with Acess 2000 or SQL2000.

Insert into TABLE1 (FEILD1,FIELD2) values (1,1),(2,2),(3,3);

It errors out everytime I have never tried to do multiple inserts before just heard about it has anyone had any success?

Thanks in advance
 
You must use 3 INSERT statements.

Insert into TABLE1 (FEILD1,FIELD2) values (1,1);
Insert into TABLE1 (FEILD1,FIELD2) values (2,2);
Insert into TABLE1 (FEILD1,FIELD2) values (3,3);
If you want to get the best answer for your question read faq183-874 and thread183-468158.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top