22,210
社区成员
发帖
与我相关
我的任务
分享
/* test.txt
张三,123456,0101011
李四,654321,1010101
王五,362145,1010111*/
if object_id('Test')is not null drop table test
go
create table test (用户名 varchar(10), 用户密码 varchar(15), 用户权限 varchar(15))
bulk insert test
from 'E:\Test.txt'
with(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
select * from test
用户名 用户密码 用户权限
---------- --------------- ---------------
张三 123456 0101011
李四 654321 1010101
王五 362145 1010111
(3 行受影响)