对于表和列,COMMENT ON语句的基本语法如下: 为表添加或修改注释: COMMENT ON TABLE table_name IS 'comment_text'; 为列添加或修改注释: COMMENT ON COLUMN table_name.column_name IS 'comment_text'; 其中,table_name是要添加注释的表的名称,column_name是表中要
SQL> comment on table employees is ''; Comment added SQL> select * from user_tab_comments where TABLE_NAME='EMPLOYEES'; TABLE_NAME TABLE_TYPE COMMENTS --- --- --- EMPLOYEES TABLE 7.删除列级说明,也是将其置为空 SQL> comment on column employees.salary is ''; Comment added SQL> select...
{table.|view.|materialized_view.}column |OPERATOR[schema.]operator |INDEXTYPE[schema.]indextype |MATERIALIZEDVIEWmaterialized_view } IS'text'; 用法如下: 1.对表的说明 commentontabletable_nameis'comments_on_tab_information'; 2.对表中列的说明 commentoncolumntable.column_...
COMMENT ON VIEW view_name IS 'comment_text'; 复制代码 对于其他数据库对象(如存储过程、函数等): COMMENT ON object_type object_name IS 'comment_text'; 复制代码 要删除已经添加的注释,可以使用以下语法: 对于表或列: COMMENT ON TABLE table_name IS ''; COMMENT ON COLUMN table_name.column_name...
comment on table sys.t is 'aa' * ERROR at line 1: ORA-01031: insufficient privileges LHR33@test18c> conn / as sysdba Connected. SYS@test18c> grant alter on sys.t to lhr33; Grant succeeded. SYS@test18c> conn lhr33/lhr Connected. ...
Oracle的COMMENT语句可以给一个列、表、视图或快照添加一个最多2K字节的注释。注释被存储在数据字典中,并且可以通过数据字典视图DBA_COL_COMMENTS(列的注释)和DBA_TAB_COMMENTS(表的注释)查看COMMENTS列。COMMENT语句的语法: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 COMMENT ON TABLE tb | COLUMN tb.co...
COMMENT ON TABLE employees IS 'This table stores employee information.'; 1. 这个语句将会修改名为 "employees" 的表的注释为 "This table stores employee information."。 需要注意的是,在 Oracle 中,表的注释被称为表级别注释(Table-level comment),而列的注释被称为列级别注释(Column-level comment)。
commentontabletable_nameis'comments_on_tab_information'; 2.对表中列的说明 commentoncolumntable.column_nameis'comments_on_col_information'; 3.查看表的说明 SQL>select*fromuser_tab_commentswhereTABLE_NAME='EMPLOYEES'; TABLE_NAMETABLE_TYPECOMMENTS ...
alter table USER modify column ID varchar(32) comment '主键ID'; /*3.达梦数据库创建注释*/ /*表本身注释*/ comment ON TABLE 表名 IS '注释信息'; /*字段注释*/ comment ON COLUMN "表名".字段名 IS '注释信息'; /*实例如下:*/ comment ON TABLE USER IS '用户表'; ...
Oracle数据库的建表语句create table没有增加注释的功能。可以通过注释语句comment来创建注释,例如:comment on column table_name.column_name is 'comment';comment on table table_name is 'comment';嗯