摘要:
--查询虚拟表的所有字段和类型Select a.name as TableName,C.name AS TYPE from syscolumns a,sysobjects b,systypes c where a.id = b.idand b.type = 'U' and a.xtype=c.xty 阅读全文
posted @ 2017-04-28 22:52
码着码着就习惯了
阅读(189)
评论(0)
推荐(0)
摘要:
--获得相应的年、月、日Select Datename(year,GetDate())+'-'+Datename(month,GetDate())+'-'+Datename(day,GetDate()) select datediff(year, 开始日期,结束日期); --两日期间隔年select 阅读全文
posted @ 2017-04-28 22:50
码着码着就习惯了
阅读(235)
评论(0)
推荐(0)
摘要:
--新增字段alter table Slurry_Color_Ref add Color_Code nvarchar(50)--更改字段alter table Slurry_Color_Ref alter column Color_Code nvarchar(50)--删除字段ALTER TABLE 阅读全文
posted @ 2017-04-28 22:49
码着码着就习惯了
阅读(107)
评论(0)
推荐(0)
摘要:
Format(Val(TtxtCtn_No), "00000") 阅读全文
posted @ 2017-04-28 22:48
码着码着就习惯了
阅读(362)
评论(0)
推荐(0)
摘要:
select b.name,a.text from syscomments a,sysobjects b where a.id=b.id and a.text LIKE N'%Mail_Address%' 阅读全文
posted @ 2017-04-28 22:48
码着码着就习惯了
阅读(252)
评论(0)
推荐(0)
摘要:
-- 启用xp_cmdshellEXEC sp_configure 'show advanced options', 1GORECONFIGUREGOEXEC sp_configure 'xp_cmdshell', 1GO--重新配置RECONFIGUREGO--执行脚本EXEC xp_cmdshe 阅读全文
posted @ 2017-04-28 22:47
码着码着就习惯了
阅读(254)
评论(0)
推荐(0)
摘要:
select * into #tmp from OPENROWSET('SQLOLEDB','SERVER=192.168.8.17;uid=fly;pwd=cim@2009;Database=scanpack', 'SET FMTONLY OFF;exec sp_Proportion_Report 阅读全文
posted @ 2017-04-28 22:44
码着码着就习惯了
阅读(233)
评论(0)
推荐(0)
摘要:
IF OBJECT_ID ('p_GetData','p') IS NOT NULL DROP PROCEDURE p_GetData;GO CREATE PROCEDURE p_GetData -- Add the parameters for the stored procedure here 阅读全文
posted @ 2017-04-28 22:35
码着码着就习惯了
阅读(398)
评论(0)
推荐(0)

浙公网安备 33010602011771号