表建立完成後使用下列命令新增列的註釋:
comment on column 表名.欄位名 is "註釋";表的註釋:yang@rac1desc user_col_comments
Name Null? Type
-------------------------- -------- ------------
TABLE_NAME NOT NULL VARCHAR2(30)
COLUMN_NAME NOT NULL VARCHAR2(30)
COMMENTS VARCHAR2(4000)
yang@rac1comment on table tchar is " 這是一個測試表";
Comment created.
yang@rac1select table_name ,comments from user_tab_comments;
TABLE_NAME COMMENTS
------------------------------ -----------------------
TCHAR 這是一個測試表
表中欄位的註釋:
yang@rac1desc user_col_comments
------------------------ -------- ----------------------------
yang@rac1comment on column tchar.val is " 測試 來自客戶 ";
yang@rac1col comments for a45
yang@rac1select comments from user_col_comments where table_name="TCHAR" and column_name="VAL";COMMENTS
測試 來自客戶
表建立完成後使用下列命令新增列的註釋:
comment on column 表名.欄位名 is "註釋";表的註釋:yang@rac1desc user_col_comments
Name Null? Type
-------------------------- -------- ------------
TABLE_NAME NOT NULL VARCHAR2(30)
COLUMN_NAME NOT NULL VARCHAR2(30)
COMMENTS VARCHAR2(4000)
yang@rac1comment on table tchar is " 這是一個測試表";
Comment created.
yang@rac1select table_name ,comments from user_tab_comments;
TABLE_NAME COMMENTS
------------------------------ -----------------------
TCHAR 這是一個測試表
表中欄位的註釋:
yang@rac1desc user_col_comments
Name Null? Type
------------------------ -------- ----------------------------
TABLE_NAME NOT NULL VARCHAR2(30)
COLUMN_NAME NOT NULL VARCHAR2(30)
COMMENTS VARCHAR2(4000)
yang@rac1comment on column tchar.val is " 測試 來自客戶 ";
Comment created.
yang@rac1col comments for a45
yang@rac1select comments from user_col_comments where table_name="TCHAR" and column_name="VAL";COMMENTS
測試 來自客戶