SQL之总结(三)
1.怎么在where指定多個值得問題?
? select * from tb_article where article_id in(10008,10009)????
? 結果如下:
?如果是字符串的話:
?????? select * from tb_article where name in ('沙利','魏凡')
?
2.between...and...會取介于兩者之間的數據?? 可以是數字 日期 和字母
? 如需使用上面的例子顯示范圍之外的人,請使用 NOT 操作符
? select * from tb_article where article_id not?between 10008 and 10009?
? select * from tb_article where article_id between 10008 and 10009?
?
?
轉載于:https://www.cnblogs.com/lovefan/p/3386630.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
- 上一篇: Ubuntu 下安装adobe flas
- 下一篇: 数据库基础知识系列