select * from 表名 select 列名1,、列名2、列名3 、列名4 from 表名 条件查询 select * from 表名 where 列名=‘查询条件’ 模糊查询 select 列名1,、列名2 from 表名 where 列名>=查询条件 列名 like ‘%123%’ ‘%123’ ‘%12__’ 模糊查询 select 列名1,、列名2 from 表名 where 列名格式=查询条件 多条件查询 select 列名1,、列名2 from 表名 where 列名=查询条件 and列名=查询条件 列名=查询条件 or列名=查询条件 1X(1+0)X1=1 1X(1+0)X0=0 列名=查询条件 or列名=查询条件 and列名=查询条件 or列名=查询条件 非空查询 select 列名1,、列名2 from 表名 where 列名 is null select 列名1,、列名2 from 表名 where 列名 is not null 过滤查询 select 列名1,、列名2 from 表名 where 表名in(查询条件) select 列名1,、列名2 from 表名 where 表名not in(查询条件) 新增语法 insert into 表名 ( 列名1、列名2 ) values (‘列名1数据’‘列名2数据’) 更改语法 update 表名 set 列名=’修改内容’ where 列名=‘修改条件’ update 表名 set 列名=null where 列名=‘修改条件’ 删除语法 delete from 表名 where 列名=‘删除条件’ 创建表的语法 create table 表名 ( 列名1类型、列名2类型 ) 设置主键约束 alter table 表名 add constraint 约束名 primary key (列名)