SQL:

  • distinct 是去重的 select DISTINCT university from user_profile;
  • 查询结果限制返回行数 :
  1. select device_id from user_profile limit 0,2 ---运行的效率高。
  2. select device_id from user_profile limit 2;--运行的效率低
  3. select device_id from user_profile limit 2 offset 0;--运行效率一般