题解 | 将查询后的列重新命名

将查询后的列重新命名

https://www.nowcoder.com/practice/0d8f49aeaf7a4e1cb7fecec980712113

  • SELECT device_id AS user_infos_example: 选择 device_id 列,并将其重命名为 user_infos_example
  • FROM user_profile: 从 user_profile 表中获取数据。
  • LIMIT 2: 限制返回的结果为前两行。
select device_id as user_infos_example   //选择device_id列,并将其重命名为user_infos_example.
from user_profile   //从user_profile表中获取数据
limit 2;   //限制返回的结果为前两行

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务