22,294
社区成员
发帖
与我相关
我的任务
分享if object_id('tb')is not null drop table tb
go
create table tb(ID varchar(10),other varchar(10))
bulk insert tb
from 'e:\test.txt'
with
(
FIELDTERMINATOR = ' ',
ROWTERMINATOR = '\n'
)
/*test.txt
12H456 r1
159357 r2
23456 r3 */
select * from tb
--查询结果
/*
(所影响的行数为 3 行)
ID other
---------- ----------
12H456 r1
159357 r2
23456 r3
(所影响的行数为 3 行*/