------------恢复内容开始------------
------------恢复内容开始------------
select 100 ;
select 'joli';
select 100%9 ;
select VERSION();
concat('lili','ss')
DESC table1
SELECT id,NAME,SUM(score) FROM student GROUP BY NAME ORDER BY SUM(score) DESC;
CONCAT('li','ss','df')
UPPER('jj')
LOWER('FF')
SUBSTR('函数表达式进行排序',2) // 数表达式进行排序 SUBSTR('函数表达式进行排序',1,3) //函数表
INSTR('函数表达式进行排序','表达式') // 3 INSTR('函数表达式进行排序','表是式') //0
TRIM(' 单独 ') TRIM('aa' FROM 'aaaaaaa张saaaa催啊汗aaaaa')
LPAD('因素苏苏’,10,'*') AS out //******因素苏苏 LPAD('因素苏苏’,2,'*') AS out //因素
REPLACE('因素苏苏','素苏','电话‘)
ROUND(-1.55) // -2 ROUND(1.567,2) // 1.57
CEIL(2.3) //3 向上取整
FLOOR(2.3)
TRUNCATE(1.69999,1) // 1.6
MOD(10,3) //1
NOW()
CURDATE()
CURTIME()
YEAR(NOW())
MONTH(NOW())
MONTHNAME(NOW())
SELECT IF(10<5,'D','S')
SUM AVG MAX MIN COUNT
1)标量子查询
2) 列子查询( IN , NOT IN , ANY, SOME, ALL)
3) 行子查询
197 :
SELECT
weather.id AS 'Id'
FROM
weather
JOIN
weather w ON DATEDIFF(weather.date, w.date) = 1
AND weather.Temperature > w.Temperature
------------恢复内容结束------------
------------恢复内容结束------------