Mysql之运算的使用
来源:互联网 发布:ubuntu gnome dock 编辑:程序博客网 时间:2024/06/05 12:01
比较运算符
Select shohin_mei,shohin_bunrui from shohin where hanbai_tanka = 500;
--选出列为500的记录
Select shohin_mei,shohin_bunrui from shohin where hanbai_tanka <> 500;
--选出列不是500的记录
可以使用的比较运算符= 、<>、>=、>、<=、<
Select shohin_id,shohin_bunrui from shohin where hanbai_tanka >= 1000;
Ps:注意不能对NULL进行比较运算符。
---选取不为NULL的记录
Select shohin_mei,shiire_tanka from shohin where shiire_tanka is not NULL;
逻辑运算符
NOT:select shohin_mei,shohin_bunrui from Shohin where not banbai_tanka >= 1000;
And(&&) 与OR(||)
Select shohin_mei,shiire_tanka from shohin where shohin_bunrui = ‘厨房用具’ and hanbai_tanka >= 3000;
Select shohin_mei,shiire_tanka from shohin where shohin_bunrui = ‘厨房用具’ or hanbai_tanka >= 3000;
Select shohin_mei,shohin_bunrui,torokubi from shohin
Where shohin_burui = ‘日用品’ and ( torokubi = ‘2009-09-11’ or torokubi = ‘2009-09-20’);
----这里()的优先级是大于and的,而and单独的优先级是大于or的
- Mysql之运算的使用
- MySQL运算符的使用
- mysql之运算符
- mysql 使用位运算
- mysql 使用位运算
- 使用Mysql运算符
- mysql 使用位运算
- MYSQL入门学习之六:MYSQL的运算符
- MYSQL入门学习之六:MYSQL的运算符
- mysql 高级之运算符
- MySQL--使用比较运算符的子查询
- mysql的比较运算
- mysql的运算法
- MYSQL的运算符
- MySQL的运算符
- 十、使用MySQL运算符
- MySQL运算符使用问题
- MySQL之索引的使用
- 可执行文件、代码段和数据段
- 理解Cookie和Session机制
- 经典算法——字符流中第一个不重复的字符
- 【个人笔记】SQL操作进阶
- ldd(linux设备驱动程序)scull驱动
- Mysql之运算的使用
- VC 串口通信实现方式
- 初学php(一)
- 理解Java中的IO
- MAT 格式操作
- 需求 - 5 - 悬浮框 - 3
- javascript的window.ActiveXObject对象,区别浏览器的方法
- Win8下Android SDK的安装与环境变量配置
- LINUX 下安装 jdk 问题(please use alien to install rpm packages on Debian )