我可以使用没有“as”关键字的mysql别名

时间:2014-09-26 06:22:12

标签: mysql

所以我的问题是,以下是否有任何不同之处?

select count(students) as nos from tbl_student;

select count(students)nos from tbl_student

1 个答案:

答案 0 :(得分:1)

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

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

关注此SO QUESTION1 ... SO QUESTION2 ... SO QUESTION3