数据库
首页 > 数据库> > SQL11、高级操作符练习(1)

SQL11、高级操作符练习(1)

作者:互联网

思路:使用WHERE关键字添加限定条件,并且注意用 AND关键字添加多个限定条件

代码解释:从表user_profile中取出列device_idgenderageuniversitygpa,并添加限定条件:性别为男性、gpa大于3.5

SELECT 
  device_id, 
  gender, 
  age, 
  university, 
  gpa
FROM 
  user_profile
WHERE 
  gender = 'male' 
  AND gpa > 3.5

题目:https://www.nowcoder.com/practice/2d2e37474197488fbdf8f9206f66651c?tpId=199&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%3Fpage%3D1%26tab%3DSQL%25E7%25AF%2587%26topicId%3D199

标签:profile,限定,gender,练习,gpa,SQL11,操作符,添加,id
来源: https://www.cnblogs.com/tiansz/p/16464643.html