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 QUERY

Author  Topic 

newman
Starting Member

7 Posts

Posted - 2005-09-01 : 09:04:48
Hello friends!

I want to know weather we can insert more than 1 records from a single INSERT query in query analyzer?

If yes please tell me how to..

Thankyou.

nr
SQLTeam MVY

12543 Posts

Posted - 2005-09-01 : 09:06:03
yes

insert tbl
select ...
from tbl2
where


insert tbl
select * from
(select 1,2,3 union all select 2,3,4) a

insert tbl
select * from
(select 1,2,3) a
cross join (select 'a' union all select 'b') b


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -