常用sql语句

查询
select * from a_table a where a.id
新增
insert into table(field1,field2,field3) values(value1,value2,value3)
修改
update a_table a set field where a.id
删除
delete from a_table a where a.id

左连接
select * from a_table a letf join b_table b on a.id=b.id
右连接
select * from a_table a right join b_table b on a.id=b.id
内连接–>>inner join 可以简写为join
select * from a_table a inner join b_table b on a.id=b.id
全连接
select *from a_table a full join b_table b on a.id=b.id

你可能感兴趣的:(常用sql语句)