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
 Transact-SQL (2000)
 inserting multiple rows with single insert

Author  Topic 

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2007-02-23 : 13:17:54
Gurus
Can we insert multiple rows with single insert?
Like this
insert into users(username,password,roles) values('hstewart','codeproject','Administrator')('abc','code','User')

Regards
Nitin

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-23 : 20:27:44
[code]
insert into users(username,password,roles)
select 'hstewart','codeproject','Administrator' union all
select 'abc','code','User'
[/code]


KH

Go to Top of Page
   

- Advertisement -