gpt4 book ai didi

mysql - 我可以在没有 "as"关键字的情况下使用 mysql 别名吗

转载 作者:行者123 更新时间:2023-11-29 00:09:12 25 4
gpt4 key购买 nike

所以我的问题是,下面有什么区别吗?

select count(students) as nos from tbl_student;

select count(students)nos from tbl_student

最佳答案

没有区别。 “AS”关键字是可选的。

当您使用 AS 关键字时,人们会发现它更具可读性和清晰度。使用它的原因是在读取大型查询时,通过查找 AS 更容易找出别名。

关注这个SO QUESTION1 ... SO QUESTION2 ... SO QUESTION3

关于mysql - 我可以在没有 "as"关键字的情况下使用 mysql 别名吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26053264/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com