摘要:
--判断临时表是否存在,存在则删除重建if exists(select 1 from tempdb..sysobjects where id=object_id('tempdb..#tabName') and xtype='u')drop table #tabNamegocreate table # 阅读全文
摘要:
今天的所有数据:select * from 表名 where DateDiff(dd,datetime类型字段,getdate())=0 昨天的所有数据:select * from 表名 where DateDiff(dd,datetime类型字段,getdate())=1 7天内的所有数据:sel 阅读全文