摘要:
1 DECLARE @column1 varchar(50) 2 DECLARE My_Cursor CURSOR --定义游标 3 FOR (SELECT column1 FROM #temp1) --查出需要的集合放到游标中 4 OPEN My_Cursor; --打开游标 5 FETCH NEXT FROM My_Cursor into @column1; -... 阅读全文
摘要:
--临时表 insert into ##table([column1],S1, S2,S3)VALUES('VALUE','VALUE','VALUE','VALUE') --把原S1, S2,S3列名 作为 star字段的内容,S1, S2,S3的数据放到qty字段中 insert into ta 阅读全文