上节课作业:
question: <='N',如果出现N,等<'O',为什么=N不能出现N?
SQL2:
1. LIKE: match on similar values
用在WHERE中,在限定中找相似,加%或-和‘’
ILIKE不区分大小写,LIKE区分大小写
2. IN: specify a list of values that you'd like to include in the results
用在WHERE中,value用逗号连接,非数字加‘’
3. BETWEEN AND
4. IS NULL
5. AND
6. OR
AND和OR一起用要加(),注意括号位置
7. NOT
IS NOT NULL用的较多,NOT不能与>,<,=一起使用
8. ORDER BY
默认按照升序顺序排列,降序排列在ORDER BY后加DESC,先数字,再字母,如ORDER BY year DESC, year_rank DESC(先按照year降序排序,再按照year rank降序排序),ORDER BY year,year_rank DESC(先按照year升序排序,再按照year rank降序排序)
以各种分组排列,中间加逗号,如ORDER BY year, year_rank
用在限定环境中,放在WHERE之后