Home  >  Article  >  Backend Development  >  mysql查询中的小数点是什么意义

mysql查询中的小数点是什么意义

WBOY
WBOYOriginal
2016-06-13 12:10:021315browse

mysql查询中的小数点是什么意思,
我看有的是这样写的select g.name SUM(og.names_number) as names_number ;这个g.是什么意思,怎么还有个小数点啊,表中并没有g啊
------解决思路----------------------
select g.id,g.name from table as g

g代表表的别名,如果表名很长可以通过别名来替代,
------解决思路----------------------
库名.表名.字段名
完整写是这样的
------解决思路----------------------
as 可以缺省

select g.* from tbl_name as g
select g.* from tbl_name g

都是可以的

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn