SQL5、 将查询后的列重新命名

思路:使用AS关键字重命名

代码解释:基本与上题相同,只不过要将device_id列重命名为user_infos_example

SELECT
  device_id AS user_infos_example
FROM
  user_profile
WHERE
  id = 1
  OR id = 2;

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

posted @ 2022-07-11 00:16  tiansz  阅读(44)  评论(0编辑  收藏  举报