【Data Platform】/SQL Server

[2k] 테이블 정보 확인(제약조건, 권한, 인덱스, 모든 정보)

디비랑 2008. 9. 8. 11:45
  1. /**********************************************************************************************
    -- Title : [2k] 테이블 정보 확인(제약조건, 권한, 인덱스, 모든 정보)
    -- Reference : Books On-Line
    -- Key word : sp_fkeys, sp_column_privileges, sp_helpindex, sp_help
    **********************************************************************************************/
    -- Foreign Key 제약 조건 정보 확인하기
    USE northwind
    GO

    EXEC sp_fkeys N'customers'
    GO

    -- 테이블의 컬럼 Privilege 정보 확인하기
    USE Northwind
    GO

    EXEC sp_column_privileges Employees
    GO

    -- 테이블의 인덱스 정보 확인하기
    USE northwind
    GO

    EXEC sp_helpindex employees
    GO

    -- 테이블의 제약 조건 정보 확인하기
    USE Northwind
    GO

    EXEC sp_helpconstraint Employees
    GO

    -- 테이블의 모든 정보 확인하기
    USE Northwind
    GO

    EXEC sp_help Employees
    GO