SQL to add column and comment in table in single command

后端 未结 4 2070
谎友^
谎友^ 2021-02-11 13:08

I am using Oracle 11g for my web application. I want to add a column and a comment to an existing table. I can do that easily with the below commands

ALTER TABLE         


        
4条回答
  •  时光说笑
    2021-02-11 13:28

    You can use below query to update or create comment on already created table.

    SYNTAX:

    COMMENT ON COLUMN TableName.ColumnName IS 'comment text';
    

    Example:

    COMMENT ON COLUMN TAB_SAMBANGI.MY_COLUMN IS 'This is a comment on my column...';
    

提交回复
热议问题