Jack-Leung

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

编辑器加载中...

SELECT a.name FROM [Dev_Attendance_v1.7].sys.tables AS a

SELECT A.name AS tableName,B.name AS columnName,B.max_length FROM [Dev_Attendance_v1.7].sys.tables AS A
INNER JOIN sys.columns B ON B.object_id=A.object_id
LEFT JOIN sys.extended_properties C
ON C.major_id=B.object_id
AND C.minor_id=B.column_id
WHERE A.name IN (SELECT a.name FROM [Dev_Attendance_v1.7].sys.tables AS a)


SELECT c.name,t.name FROM systypes t, syscolumns c
WHERE t.xtype = c.xtype AND
c.id = (SELECT id FROM sysobjects WHERE name ='Attendance_Schedules' )
ORDER BY c.colid
posted on 2012-03-27 12:41  Jack.leung  阅读(361)  评论(0编辑  收藏  举报