as关键字
1、为表取别名
SELECT * FROM 表名 [AS] 表的别名 WHERE .... ;
select * from student as stu;
2、为字段取别名
SELECT 字段名1 [AS] 别名1 , 字段名2 [AS] 别名2 , ... FROM 表名 WHERE ... ;
select name as '姓名',id from student;
posted on 2023-03-22 13:51 默玖 阅读(285) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 默玖 Powered by .NET 8.0 on Kubernetes