摘要: 判断临时表是否存在,存在则删除 if OBJECT_ID('tempdb..#tempTable') IS NOT NULL begin DROP TABLE #temp_Table end 创建临时表(' # '局部的临时表仅在会话里边, ' ## '全局的的临时表) create table # 阅读全文
posted @ 2020-09-29 20:15 龙er飞 阅读(3947) 评论(0) 推荐(1) 编辑
摘要: 对Table 表做操作 Table Table(表名),id(Table的自增字段),临时表的定义 用ID递增 去循环 declare @id int =0 while( (select top 1 id from Table where id>@id order by id)>0 ) begin 阅读全文
posted @ 2020-09-29 16:59 龙er飞 阅读(547) 评论(0) 推荐(0) 编辑