DECLARE @tableName NVARCHAR(MAX);SET @tableName = N'UserIntegralExchange'; --表名!!! SELECT CASE WHEN col.colorder = 1 THEN obj.name ELSE '' END AS 表名 , col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value], '') AS 列说明 , t.name AS 数据类型 , col.length
SELECT DISTINCT d.name, f.value FROM syscolumns a LEFT JOIN systypes b ON a.xusertype= b.xusertype INNER JOIN sysobjects d ON a.id= d.id AND d.xtype= 'U' AND d.name<> 'dtproperties' LEFT JOIN syscomments e ON a.cdefault= e.id LEFT JOIN sys.extended_
获取表: select table_name from user_tables; //当前用户拥有的表 select table_name from all_tables; //所有用户的表 select table_name from dba_tables; //包括系统表 select table_name from dba_tables where owner='用户名' user_tables: table_name,tablespace_name,last_analyzed等 dba_
获取表:select table_name from user_tables; //当前用户拥有的表 select table_name from all_tables; //所有用户的表 select table_name from dba_tables; //包括系统表 select table_name from dba_tables where owner='用户名' user_tables: table_name,tablespace_name,last_analyzed等 dba_t