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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 INSERT

Author  Topic 

supersql
Yak Posting Veteran

99 Posts

Posted - 2005-09-21 : 12:16:38
Hi
I am using INSERT INTO (columns) SELECT FROM (columns) to load data into my tables where it inserts all the rows at a time. How can insert single row at a time.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-09-21 : 12:55:43
INSERT INTO (columns) VALUES(@var1, @var2...)

Tara
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-22 : 00:58:26
Or
you can limit the result of second query to return single row using Where Clause

INSERT INTO Table1(columns) SELECT (columns) FROM table2 where <condition>



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -