oracle create table, drop table, add fields, delete fields, tables, notes, field notes, modify table properties

1, create a table

. 1  Create Table table (
 2         ClassID Number ( 2 ) Primary Key, 
. 4              Field data type is allowed to be null (Not null : not null / null : Allow null) Default value ( default  ' XXX ' )
 . 5        );

2, delete the table ( caution )

1 drop  table 表名

3, plus table to table Remarks

1 comment on table 表名 is 'XXXXXX'

4, add notes to the table field

. 1 Comment ON column table. Field Name IS  ' xxxxx '

5, field attributes modify the table

. 1 ALTER table Table modify (Field Type Default name field is blank);

6, delete table fields

. 1 ALTER Table drop column table name field name

 

Guess you like

Origin www.cnblogs.com/chenyanbin/p/11206021.html