목록테이블 (1)
Data Modeling Evangelist Kaien Kim's Blog
[SQLServer]특정테이블의 컬럼정보 가져오기
-- 특정테이블의 컬럼정보가져오기 select * FROM INFORMATION_SCHEMA.COLUMNS where table_name = 'Customer' order by table_name,ordinal_position -- 특정테이블의 PK정보가져오기 select constraint_name from information_schema.table_constraints where constraint_type='PRIMARY KEY' and table_name = 'Customer' -- 특정테이블의 FK정보가져오기 select constraint_name from information_schema.table_constraints where constraint_type='FOREIGN KEY' and..
DATA/SQLServer
2009. 1. 16. 17:08