简单查询
SELECT…… FROM…… WHERE……
查询表中指定的字段
select 工资 from 职工
去掉重复的-----distinct
select distinct工资 from 职工
select 职工号,工资 from 职工
查询表中所有字段
select * from 职工
有条件的查询
select distinct 仓库号 from 职工 where 工资>1210
select 职工号 from 职工 where 工资>1230
select 职工号 from 职工 where 工资<1250 and (仓库号="WH1" OR 仓库号="WH2")
select * from 职工 where 工资 >=1220 AND 工资<=1240
between …… AND
select * from 职工 where 工资 between 1220 AND 1240
like ( %和_ )
select * from 供应商 where 供应商名 like "%公司"
select * from 供应商 wh