组合查询
union 在查询的过程中自动的去掉了重复的行,
union all会显示所有的结果
插入数据
insert into table_name(...) values(...);
复制表
select *
into table_name_copy
from table_name;
create table table_name_copy as
select * from table_name;
更新
update table_name
set table_column_name = ...
where table_column_name_2 = ...;
删除
delete from table_name
where ...;
创建表
create table table_name
(
table_column_name_1 data_type_1 null,
table_column_name 2 data_type_2 not null
);
更新表
alter table table_name
add new_table_column_name data_type;
alter table table_name
drop column table_column_name;
drop table table_name;
创建视图
create view view_name as
select ...;