create table tblEmp (eid int, ename varchar(20), estatus bit)
sqlserver2005
basic: insert into tblEmp values (0,'emp', 'True')
insert into tblEmp select 1,'emp1','True'
union all select 2,'emp2','True'
union all select 3,'emp3','True'
sqlserver2008
insert into tblEmp values (1,'emp1','True'),(2,'emp2','True'),(3,'emp3','True')
If table not exist in database then:
select * into tblEmp from (select 1 eid,'emp1' ename,'True' estatus) tbltemp
No comments:
Post a Comment