1 题目
2 MySQL
2.1 方法一(不等于,取模,排序)
select id, movie, description, rating
from cinema
where description <> 'boring'
and id % 2 = 1
order by rating desc;
写的不好
1 != 改用 <>
2 取模方法:& mod % (判断奇偶数才能用&;效率未知)
3 and 前应该放筛选快的条件
select id, movie, description, rating
from cinema
# where id % 2 = 1
# where mod(id, 2) = 1
where id & 1 = 1
and description <> 'boring'
order by rating desc;