Modify tables, add columns, delete columns, and modify columns in oracle

Source: Internet
Author: User

Oracle alter table, add column, delete column, modify column 1. add alter table table_name ADD (column datatype [default expr] [, column datatype...]); for example: SQL> ALTER TABLE emp01 ADD eno NUMBER (4); 2. MODIFY the column definition, for example, SQL> ALTER TABLE emp01 MODIFY job VARCHAR2 (15) 2 DEFAULT 'cler' 3. delete a COLUMN, for example, SQL> ALTER TABLE emp01 DROP COLUMN dno; 4. modify the COLUMN name, for example, SQL> ALTER TABLE emp01 RENAME COLUMN eno TO empno; 5. modify the table name, for example, SQL> RENAME emp01 TO employee; 6. add comments such as SQL> comment on table employee IS 'employee information'; SQL> COMMENT ON TABLE employee. name IS 'employee name ';

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.