--insert into tablename (field1...) values(value1...)
--insert into select * from table2 where
--将磁盘文本数据导入数据表
bulk insert nameorder
from 'e:\**.txt'
--字段终结符,行结束标志
with(fieldterminator =',' ,rowterminator='\n')
create table nameorder
(nonum varchar(10),noins varchar (50),nocless varchar(40),noxh varchar(20),noname varchar(20),nohw varchar(10))
select * from nameorder
--查找姓陈的同学
select * from nameorder where left(noname,1)='陈'
-- ----------------------
create table tb1
(nid int,nam varchar(10),nag int,nwt int)
--插入数据
insert into tb1(nid,nam) values (2,'b')
--
insert into tb2(nid) select * from tb1
--insert into values ,insert into select,bulk insert from with
--text files and table file switch
--查询未完成的同学
select * from nameorder where nohw='未完成'
alter table alter add drop
--insert into select * from table2 where
--将磁盘文本数据导入数据表
bulk insert nameorder
from 'e:\**.txt'
--字段终结符,行结束标志
with(fieldterminator =',' ,rowterminator='\n')
create table nameorder
(nonum varchar(10),noins varchar (50),nocless varchar(40),noxh varchar(20),noname varchar(20),nohw varchar(10))
select * from nameorder
--查找姓陈的同学
select * from nameorder where left(noname,1)='陈'
-- ----------------------
create table tb1
(nid int,nam varchar(10),nag int,nwt int)
--插入数据
insert into tb1(nid,nam) values (2,'b')
--
insert into tb2(nid) select * from tb1
--insert into values ,insert into select,bulk insert from with
--text files and table file switch
--查询未完成的同学
select * from nameorder where nohw='未完成'
alter table alter add drop