思路:使用WHERE
关键字添加限定条件,并且用正则表达式匹配数据
代码解释:从表user_profile
中取出列device_id
、age
、university
,并限定数据来自学校名称中含有北京的用户
SELECT
device_id,
age,
university
FROM
user_profile
WHERE
university REGEXP '北京'
题目:https://www.nowcoder.com/practice/95d9922b1e2a49de80daa491889969ee?tpId=199&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%3Fpage%3D1%26tab%3DSQL%25E7%25AF%2587%26topicId%3D199
标签:profile,查看,学校名称,university,user,SQL15,device,id
来源: https://www.cnblogs.com/tiansz/p/16465204.html