数据库

数据库

数据库Like关键字 模糊匹配

共295人围观 0人评论

# 案例一SELECTemployees.last_name,employees.salaryFROMemployeesWHEREemployees.last_name like '__n_l%'; # 第三个字符是n 第五个字符是l# 案例二# 转义方式一SELECTemployees.last_name,empl......

数据库

分支判断IFNULL()函数

共301人围观 0人评论

SELECTIFNULLemployees.commission_pct,0 as 奖金率,employees.commission_pctFROMemployees;# --------------------------------SELECTCONCATemployees.first_name,',',emplo......

数据库

字段拼接CONCAT()函数

共290人围观 0人评论

SELECT CONCAT'a','n','o' as 查询字段拼接; # 字段拼接SELECT CONCATemployees.last_name,employees.first_name as 姓名 from employees; # 字段拼接 + 别名

数据库

数据类型转换

共321人围观 0人评论

1、select '123' + 90; #返回 213 转换成功 '123' 为1232、select 'john' + 90; #返回90 转换失败 'john' 为 03、select null + 90 #一定返回null

分类选择