时间:2021-07-01 10:21:17 帮助过:20人阅读
1.存在型验证 select 1, 例如:
SELECT
1
FROM
worker
WHERE
phone = 18611406603 存在为1,否则为空
2.登录型校验 limit 1,例如:
SELECT
`password`
FROM
worker
WHERE
phone = 18611406603
LIMIT 1
结果无值,不需验证;有值,校验
3.数量型查询 SELECT COUNT(1) 例如:
SELECT
COUNT(1)
FROM
worker
WHERE
phone = 18611406603
4.字段型查询
SELECT
`password`
FROM
worker
WHERE
phone = 18611406603
java中常规使用的mysql语句
标签:查询 否则 校验 语句 phone mysql 登录 one rom