SQL语句大杂烩

来源:互联网 发布:非遗文化知多少 编辑:程序博客网 时间:2024/06/05 06:30

1.选择并排序

SELECT 

`spell_series`.id,`spell_series`.`name`,

`spell`.`id`, spell.`name`,spell.`level`,spell.`spellSeriesId`  

FROM `spell`, `spell_series`

WHERE spell.`spellSeriesId` = `spell_series`.`id`

ORDER BY `spell`.`spellSeriesId` DESC, spell.`level` ASC