摘要:
SQL模糊查询 %:代表匹配0个字符、1个字符或者多个字符 _:代表匹配有且只有一个字符 []:代表匹配范围内 [^]:代表匹配不在范围内 select * from people where PeopleName like '刘%'; --查询姓刘的员工,名字是两个字 select *from p 阅读全文
posted @ 2022-06-30 14:59
雨過天晴oO
阅读(295)
评论(0)
推荐(0)
摘要:
case语句 1、语法:select * , case when then end from 表名; --查询所有员工信息,添加一列,显示生肖 select *, CASE when year(PeopleBirth)%12=4 then '鼠' when year(PeopleBirth)%12= 阅读全文
posted @ 2022-06-30 13:56
雨過天晴oO
阅读(773)
评论(0)
推荐(0)
摘要:
子查询 语法:select * from 表名 where 字段1 条件1 (select * from 表名 where 字段2 条件2); --查询出工资比赵云高的员工信息 SELECT * from people WHERE PeopleSalary>( select peoplesalary 阅读全文
posted @ 2022-06-30 11:15
雨過天晴oO
阅读(45)
评论(0)
推荐(0)

浙公网安备 33010602011771号