문서의 이전 판입니다!
-- 테이블 정보
SELECT
*
FROM
information_schema.tables
WHERE
table_schema = '{데이터베이스}'
ORDER BY
table_name ASC
;
-- 컬럼 정보
SELECT
*
FROM
information_schema.columns
WHERE
table_schema = '{데이터베이스}' AND table_name = '{테이블}'
ORDER BY
ordinal_position ASC
;
-- 테이블 정보
SELECT
*
FROM
sys.tables
ORDER BY
name ASC
;
-- 컬럼 정보
SELECT
*
FROM
sys.columns
WHERE
object_id = '{OBJECT_ID}';
ORDER BY
column_id ASC
;
-- 테이블 정보
SELECT
*
FROM
all_tables
ORDER BY
table_name ASC
;
-- 컬럼 정보
SELECT
*
FROM
all_tab_columns
WHERE
table_name = '{테이블}'
ORDER BY
column_id ASC
;
-- 테이블 정보
SELECT
*
FROM
information_schema.tables
WHERE
table_catalog = '{데이터베이스}' AND table_schema = 'public'
ORDER BY
table_name ASC
;
-- 컬럼 정보
SELECT
*
FROM
information_schema.columns
WHERE
table_catalog = '{데이터베이스}' AND table_schema = 'public' AND table_name = '{테이블}'
ORDER BY
ordinal_position ASC
;