if object_id('#temp1') is not null
drop table #temp1
go
create table #temp1(field1 nvarchar(100),
field2 float)
bulk insert #temp1 from 'd:\foo.txt'
with(fieldterminator=' ',rowterminator='\n')
select * from #temp1
drop table #temp1
if object_id('#temp1') is not null
drop table #temp1
go
create table #temp1(field1 nvarchar(100),
field2 float)
bulk insert #temp1 from 'd:\foo.txt'
with(fieldterminator=' ',rowterminator='\n')
select * from #temp1
drop table #temp1
转载于:https://www.cnblogs.com/shiyinian/p/5160624.html