摘要: select db_name() as CONSTRAINT_CATALOG,t_obj.name as TABLE_NAME,user_name(c_obj.uid) as CONSTRAINT_SCHEMA,c_obj.name as CONSTRAINT_NAME,col.name as COLUMN_NAME,col.colid as ORDINAL_POSITION,com.text as DEFAULT_CLAUSEfrom sysobjects c_objjoin syscomments com on c_obj.id = com.idjoin sysobjects t_obj 阅读全文
posted @ 2013-04-01 18:18 信息化建设 阅读(222) 评论(0) 推荐(0) 编辑
摘要: if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#table') and type='U') DROP TABLE #table CREATE TABLE #table ( [RECNUM] [decimal](28, 0) IDENTITY(1, 1) NOT NULL , ModuleCode NVARCHAR(30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , FunctionCode NVARCHAR(3 阅读全文
posted @ 2013-04-01 18:16 信息化建设 阅读(338) 评论(0) 推荐(0) 编辑