Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 INSERT STATEMENT

Author  Topic 

sadbjp
INNER JOIN

41 Posts

Posted - 2007-05-01 : 18:34:06
Hi All,

I have a table "Person" that has two columns "FirstName" and "LastName".
How can I insert multiple rows e.g. values
FirtName: "Vishal" and "Singh"
LastName: "John" and "Singh" using INSERT stsmt.


Thanks in advance,
Vishal S

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-05-01 : 18:38:09
INSERT INTO Person (FirstName, LastName)
SELECT 'Vishal','Singh' UNION ALL
SELECT 'John','Singh'



Dinakar Nethi
SQL Server MVP
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-05-01 : 18:50:54
Duplicate http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82931


KH

Go to Top of Page

sadbjp
INNER JOIN

41 Posts

Posted - 2007-05-01 : 18:51:36
Thanks Mr.Nethi. It certainly did helped.
Go to Top of Page
   

- Advertisement -