- SELECT
- a.table_name AS 表名,
- b.comments AS 表备注,
- c.created AS 创建时间,
- c.last_ddl_time AS 最后修改时间,
- (
- SELECT
- wmsys.wm_concat ( cu.COLUMN_NAME )
- FROM
- user_cons_columns cu,
- user_constraints au
- WHERE
- cu.constraint_name = au.constraint_name
- AND au.constraint_type = 'P'
- AND au.table_name = a.table_name
- ) AS 主键
- FROM
- user_tables a,
- user_tab_comments b,
- user_objects c
- WHERE
- a.table_name = b.table_name
- and b.table_name = c.object_name
- ORDER BY
- c.created desc;