表的读写操作:
create table ==新建表
show tables == 查看有多少涨表
show columns from ==查看表的结构,desc
insert into table values()==插入行记录
select * from table ==查看表结构
select xx from table ==列示指定记录
delete from table ==全删记录
delete from table where… ==有条件删除记录
select from table where…==有条件查询
select xx from table where … not in … ==范围内查询
update table set…where ==有条件更新字段
select xx as yy from table == 替换字段名称再显示
like … ==模糊查找
select from where (select from where)== select嵌套,标间交叉查询
where x > all () 或 where x < any () == 条件判断型显示
where exists() 或 where not exists() ==后面条件为真/为假是执行前面的语句
select…union select…== 粘贴取并集,要求前后所选出的部分要列数相同
left join ==以左表为基准审查右表,from之后是左表
right join ==以右表为基准审查左表,on之后是右表