摘要:
表名:tb_WebSitePromotion字段1:ID字段2:WebSiteInfoID网站编号字段3:StartDate生效开始日期字段4:EndDate生效结束日期select a.*from tb_WebSitePromotion as ainner join tb_WebSitePromotion as b on a.WebSiteInfoID=b.WebSiteInfoID and a.IDb.ID and ((a.StartDate >=b.StartDate and a.StartDate=a.StartDate and b.StartDate<isnull(a.E 阅读全文
摘要:
该存储过程必须在master 数据库下执行 调用 在当前数据库下 调用 如 sp_killspid 数据库名Create proc sp_killspid (@dbname varchar(20)) as begin declare @sql nvarchar(500) declare @spid int set @sql='declare getspid cursor for select spid from sysprocesses where dbid=db_id('''+@dbname+''')' exec (@sql) 阅读全文
摘要:
SELECT 表名 = d.name ,表说明 = case when a.colorder=1 then isnull(f.value,'') else '' end,字段序号 = a.colorder,字段名 = a.name,标识 = case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end,主键 = case when exists(SELECT 1 FROM sysobjects where xtype='P 阅读全文