没有一个人回答到点上
先建结果表,然后写入, create table #t([表结构]) insert into #t([字段列表]) exec zysf_fymx;1 '2014-01-01 00:00:00','2014-12-31 23:59:59','9999',0,'','1'
create table #t([表结构]) insert into #t([字段列表]) exec zysf_fymx;1 '2014-01-01 00:00:00','2014-12-31 23:59:59','9999',0,'','1'
直接用SQL语句就可以实现: --表存在 insert into 新表(...) select .. from 旧表 where ... --表不存在 select ... into 新表 from 旧表 where ...
Insert into Table2(field1,field2,...) select value1,value2,... from (存储过程查出来的数据集)
22,300
社区成员
121,734
社区内容
加载中
试试用AI创作助手写篇文章吧