建表
create table (
column_name1 column_type [not null] [check (expression)]
[default value] [primary key][references (column_name)],
column_name2 column_type [not null] [check (expression)]
[default value] [primary key][references (column_name)]
....
[constraint primary_name
primary key(column_name1,column_name2...)
]
[unique()]
);
create table
as
select * from where
---------------------------------------------------------------------------------------
改表结构
1 alter table add(column_name column_type);
2 alter table modify(column_naem column_type);
---------------------------------------------------------------------------------------
删表
drop table ;
truncate table ;
---------------------------------------------------------------------------------------
表的重命名
rename to ;
---------------------------------------------------------------------------------------
插入数据
1 insert into (column_name1, column_name2, ....)
values (column_value1, column_value2,.... );
2 insert into
values (column_value1, column_value2,.... );
3 insert into (column_name1, column_name2, ....)
select expression1,expression2, ....
from
[where ];
---------------------------------------------------------------------------------------
表�