oracle add/modify/delete database field SQL

To add, modify, or delete multiple columns, separate them with commas.

1. Create the table structure:
create table test1

(id   INTEGER  not null,

name  varchar2(20) );

2. The syntax for adding fields: alter table tablename add (column datatype [default value][null/not null],….);

Example: alter table table name  add ( field name    data format);

 Modify comments: comment on column table name. field name is 'comment content';

3. The syntax of modifying the field: alter table tablename modify (column datatype [default value][null/not null],….);

Fourth, delete the field syntax: alter table tablename drop (column);

http://www.jb51.net/article/45539.htm


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324876650&siteId=291194637