SELECT * FROM jdsx_lilongjun
DELETE FROM jdsx_lilongjun WHERE id = 108
UPDATE jdsx_lilongjun SET provice = "河北省",city = "邯郸市",gender = 1 WHERE provice = ""
ALTER TABLE jdsx_lilongjun DROP COLUMN age
SELECT id,name,provice,city FROM jdsx_lilongjun
WHERE weight = 150
SELECT id,name,provice,city FROM jdsx_lilongjun
WHERE name like "_UT%"
SELECT id,name,provice,city FROM jdsx_lilongjun
WHERE id BETWEEN 7 AND 10
ORDER BY
id
DESC
UPDATE jdsx_lilongjun SET height = 200 WHERE id = 7
UPDATE jdsx_lilongjun SET provice = "河南省",city = "鹤壁市" WHERE id = 8
SELECT SUM(height) FROM jdsx_lilongjun
SELECT MAX(height) FROM jdsx_lilongjun
SELECT MIN(height) FROM jdsx_lilongjun
SELECT COUNT(height) FROM jdsx_lilongjun
WHERE height BETWEEN 170 AND 200
UPDATE jdsx_lilongjun SET name = "王超" WHERE id = 7
SELECT *FROM jdsx_lilongjun
WHERE height BETWEEN 170 AND 200
GROUP BY
name
SELECT * FROM jdsx_lilongjun LEFT JOIN
SELECT * FROM jdsx_lilongjun
SELECT count(name) AS 数量,name,height,weight,provice,city FROM jdsx_lilongjun GROUP BY name,height,weight,provice,city
SELECT DISTINCT name,height,weight,provice,city FROM jdsx_lilongjun
DELETE FROM jdsx_lilongjun
WHERE name = "PUT001"
SELECT *FROM jdsx_lilongjun
LEFT JOIN jdsx_lilongjun_user_role
ON jdsx_lilongjun.id = jdsx_lilongjun_user_role.id
SELECT name,height,weight,user_id,role_id FROM jdsx_lilongjun
RIGHT JOIN jdsx_lilongjun_user_role
ON jdsx_lilongjun.id = jdsx_lilongjun_user_role.id
SELECT *FROM jdsx_lilongjun WHERE name IN("王超","插入")
SELECT *FROM jdsx_lilongjun WHERE ID BETWEEN 1 AND 100
UPDATE jdsx_lilongjun SET name = "建业" WHERE id = 105
SELECT * FROM jdsx_lilongjun GROUP BY name HAVING AVG(height)<180
ORDER BY id
ASC
INSERT INTO jdsx_lilongjun VALUES(9,"王超",120,160,"","",1)
SELECT AVG(height) FROM jdsx_lilongjun
SELECT * FROM jdsx_lilongjun
SELECT *,
CASE provice
WHEN provice = "河南省" THEN "一线城市"
WHEN provice = "河北省" THEN "二线城市"
ELSE "其它城市"
END AS "城市等级"
FROM jdsx_lilongjun
SELECT *,
CASE height
WHEN height <=150 THEN "小个子"
WHEN height BETWEEN 150 AND 180 THEN "中等个子"
WHEN height BETWEEN 180 AND 200 THEN "大个子"
ELSE "傻个子"
END AS "个头"
FROM jdsx_lilongjun
SELECT *,
CASE
WHEN height <150 THEN "小个子"
WHEN height BETWEEN 150 AND 180 THEN "中等个子"
WHEN height > 180 AND height<200 THEN "大个子"
ELSE "傻个子"
END AS "个头"
FROM jdsx_lilongjun
ORDER BY height
ASC
SELECT * FROM jdsx_lilongjun
UPDATE jdsx_lilongjun SET height = 222 WHERE id =2
SET @abc = "王超";
UPDATE jdsx_lilongjun SET name = "22" WHERE gender = 0
-- SELECT * FROM jdsx_lilongjun WHERE name = "a"
SELECT *,@var AS heightlow FROM jdsx_lilongjun
SELECT name FROM jdsx_lilongjun
UNION
SELECT creator FROM jdsx_lilongjun_user_role
ALTER TABLE jdsx_lilongjun ADD birth datetime AFTER gender
ALTER TABLE jdsx_lilongjun DROP birth
UPDATE jdsx_lilongjun SET birth = "2023-01-18 15:39:58" WHERE birth IS null
SELECT * FROM jdsx_lilongjun
UPDATE jdsx_lilongjun SET gender = 0 WHERE id = 7
UPDATE jdsx_lilongjun_user SET provice = "河南省",city="濮阳市", country = "清丰县" WHERE country = "大兴区"
SELECT *,DATE_FORMAT(birth,'%Y') AS "出生年份" FROM jdsx_lilongjun
SELECT *,DATE_FORMAT(birth,'%M') AS "出生年份" FROM jdsx_lilongjun
SELECT *,DATE_FORMAT(birth,'%m') AS "出生年份" FROM jdsx_lilongjun
SELECT *,DATE_FORMAT(birth,'%D') AS "出生年份" FROM jdsx_lilongjun
SELECT *,DATE_FORMAT(birth,'%d') AS "出生年份" FROM jdsx_lilongjun