sql常用语句
扫描二维码
随时随地手机看文章
--查询作业 SELECT * FROM msdb.dbo.sysjobs --查询作业步骤 msdb.dbo.sp_help_jobstep @job_name = N'作业名' --查询作业计划 msdb.dbo.sp_help_jobschedule @job_name = N'作业名' --打印存储过程 sp_helptext --查看表结构 SELECT TOP 100 PERCENT dbo.sysobjects.name AS 表名称, dbo.syscolumns.name AS 字段名称, dbo.systypes.name AS 数据类型, dbo.syscolumns.length AS 长度, dbo.syscolumns.xprec AS 精度, dbo.syscolumns.xscale AS 小数位数, ISNULL(g.value, '') AS 字段说明 FROM dbo.syscolumns INNER JOIN dbo.sysobjects ON dbo.syscolumns.id = dbo.sysobjects.id INNER JOIN dbo.systypes ON dbo.syscolumns.xtype = dbo.systypes.xtype LEFT OUTER JOIN dbo.sysproperties AS g ON dbo.syscolumns.id = g.id AND dbo.syscolumns.colid = g.smallid WHERE (dbo.sysobjects.type = 'U') and dbo.sysobjects.name='TDGL' ORDER BY 表名称, dbo.sysobjects.id