oracle 查詢表名 欄位名 新增注釋

2022-08-14 03:30:13 字數 761 閱讀 6538

--查詢所有表名

select t.table_name from user_tables t;

--查詢所有欄位名

select t.column_name from user_col_comments t;

--查詢指定表欄位名和注釋

select t.column_name ,t.comments from user_col_comments t where t.table_name = 't_three_killed';

--查詢表的資料條數、表名、中文表名

select a.num_rows, a.table_name, b.comments from user_tables a, user_tab_comments b;

where a.table_name =b.table_name order by table_name;

--給表新增注釋

comment on table t_three_killed is '三國殺人物表';

--給列新增注釋

comment on column t_three_killed.c_skill is '技能';

--給列起別名 as 和雙引號可以去掉

select t.c_name as "姓名",t.c_skill as "技能"from t_three_killed t;

--去重

select distinct t.c_age from t_three_killed t;

取Oracle 表名 欄位名

檢視oracle 資料庫中本使用者下的所有表 select table name from user tables 檢視oracle 資料庫中所有使用者下的所有表 select user,table name from all tables 檢視oracle 資料庫中本使用者下的所有列 select...

取Oracle 表名 欄位名

取 oracle 表名 欄位名 注釋等實用語句 sql 檢視oracle 資料庫中本使用者下的所有表 select table name from user tables 檢視oracle 資料庫中所有使用者下的所有表 select user,table name from all tables 檢...

取Oracle 表名 欄位名

檢視oracle 資料庫中本使用者下的所有表 select table name from user tables 檢視oracle 資料庫中所有使用者下的所有表 select user,table name from all tables 檢視oracle 資料庫中本使用者下的所有列 select...