当前位置:网站首页>或许你不知道的12条SQL技巧
或许你不知道的12条SQL技巧
2022-04-21 21:23:00 【InfoQ】
一、一些常见的SQL实践
select * from order where status!=0 and stauts!=1
select * from order where status in(2,3)
select * from order where desc like '%XX'
select * from order where desc like 'XX%'
select * from user where sex=1
select * from order where YEAR(date) < = '2020'
select * from order where date < = CURDATE()
select * from order where date < = '2020-01-01'
二、并非周知的SQL实践
select * from user where uid=?
select * from user where login_name=?
select * from user where name != 'shenjian'
select * from user where login_name=? and passwd=?
select * from user where passwd=? and login_name=?
select * from user where login_name=?
select * from user where passwd=?
三、小众但有用的SQL实践
select * from user where login_name=?
select * from user where login_name=? limit 1
select * from order where date < = CURDATE()
$curDate = date('Y-m-d');
$res = mysql_ query('select * from order where date < = $curDate');
select * from user where phone=13800001234
版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://xie.infoq.cn/article/b670bd3ede2a193168efdb04e
边栏推荐
- L1-005 test seat number
- 飞行安全背后,不可或缺的物联网无线通信传感器设备
- 【常用快捷键】
- 聪明的人脸识别4——Pytorch 利用Retinaface+Facenet搭建人脸识别平台
- 返璞归真,多方安全计算要回归到“安全”的本源考虑
- Application case of Lora wireless data transmission module of Internet of things: lorawan gateway communication technology
- 25. < tag array and simulation > - LT - 31 Next permutation + LT - 556 Next larger element III
- flutter插件化,来看看这份超全面的《Android面试题及解析》
- Workflow operation description
- 其它——ZeroRPC和SimpleXMLRPCServer
猜你喜欢

聪明的人脸识别4——Pytorch 利用Retinaface+Facenet搭建人脸识别平台

其它——DevOps简介

神经网络学习小记录56——Batch Normalization层的原理与作用

Module-3: Outsourcing student management system architecture design document

【zigbee无线通信模块步步详解】ZigBee3.0模块建立远程网络控制方法

Smart face recognition 3 -- pytoch builds its own facenet face recognition platform

flutter插件第三方库,给Android程序员的一些面试建议

强化学习基础篇(一):多臂老虎机 Multi-armed Bandit

通达OA与第三方APP对接

AI + great health is the right way to open the super robot?
随机推荐
Flutter plug-in third-party library, some interview suggestions for Android programmers
Other - use of Supervisor
工作流 流程设置 定制开发
档案管理系统操作说明
Tongda OA system docking single sign on platform use and Development Manual
[embedded] about IAP + XMODEM receiving bin file from outside to upgrade the chip
L1-005 考试座位号
What if the passage is full and you continue to send it inside?
【常用快捷键】
Others - Introduction to Devops
睿智的目标检测50——Tensorflow2 利用mobilenet系列(v1,v2,v3)搭建yolov4目标检测平台
shell根据分隔符截取字符串awk
Microsoft | multilingual molecular representation learning through comparative learning pre training
迅为RK3568开发板交叉编译C程序
聪明的人脸识别2——Keras 利用Retinaface+Facenet搭建人脸识别平台
Bailian3752 maze [BFS]
Tag recognition based on Huawei cloud image
EeasyBI报表系统 数据源选择代码开发手册
Solution to the installation problem of low version R language ggplot2 [rlang > = 1.0.0 is required]
Autres - - analyse de la cohérence en double écriture entre redis et MySQL