SELECT 'RX', E.Table_Name, E.Column_Name, E.Column_Order, E.Data_Type, E.Data_Length, E.Nullable--,E.Data_Scale, F.Text Data_Default
FROM (
SELECT C.Table_Name
, C.Column_Name
, C.Column_Order
, D.Name Data_Type
, C.Data_Length
, C.Data_scale
, (CASE WHEN C.IsNullable = 0 THEN 'N' ELSE 'Y' END) Nullable
, C.cdefault
FROM (
SELECT A.Name Table_Name
, B.Name Column_Name
, B.Colorder Column_Order
, B.Prec Data_Length
, B.Scale Data_scale
, B.IsNullable
, B.cdefault
, B.xType
FROM dbo.SysObjects A, dbo.SysColumns B
WHERE A.ID = B.ID
AND A.Type = 'U'
) C
LEFT OUTER JOIN dbo.SysTypes D ON (C.xType = D.xType AND D.Name <> 'SysName')
) E
LEFT OUTER JOIN dbo.SysComments F ON (E.cdefault = F.ID)
WHERE E.Table_Name IN('Adjust', 'AlertResult','AppMemo','AppNote','AppTime','Board','ChartClose','CID','Document'
,'Family','Patient','Picture','PreReceipt','Prescription','Recall','RecallResult','Receipt','ReceiptCalc','ReceiptPlan','SMS','SMSData')
ORDER BY E.Table_Name, E.Column_Order
'DB' 카테고리의 다른 글
(Maria) Tool 설치 (HeidiSQL) (0) | 2017.04.15 |
---|---|
(Maria) Setup (0) | 2017.04.15 |
(MSSQL) 프로시저 내 특정 단어 검색하기 (0) | 2017.04.13 |
(MSSQL) 알지오 SQL 강좌 노트 (0) | 2017.04.13 |
(MSSQL) 외래키로 묶여있는 테이블 데이터 삭제하기 (0) | 2017.04.13 |