深入浅出Mysql第二章 select

select * from tablename

->select cloum1, cloum2,... from table

->select cloum1, cloum2,... from table where cloumi = ... // =, >, <, <> 比较可应用与字符

->select cloum1, cloum2,... from table where cloumi = ...   and cloumj > ... or cloumk <>

select cloum1, cloum2,... from table where cloumi in (..., ..., ...,)

select cloum1, cloum2,... from table where cloumi not in (..., ..., ...,)

select cloum1, cloum2,... from table where not cloumi  in (..., ..., ...,)

 

between选择一个有范围的值:select cloum1, cloum2,... from table where cloumi between ... and ...

like %, _:select cloum1, cloum2,... from table where cloumi like '%...'

%表示任意多个字符,_代表一个字符

is null:查询为空的列select cloum1, cloum2,... from table where cloumi is null

posted on 2014-05-21 10:01  jsy306  阅读(188)  评论(0)    收藏  举报

导航