编辑器加载中...
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