What does the decimal point in mysql Query mean,

Source: Internet
Author: User
What does the decimal point in mysql Query mean? I think some of them write select g. name SUM (og. names_number) as names_number; this g. why is there a decimal point? there is no g in the table?


Reply to discussion (solution)

. The preceding q indicates the table name or workspace (alias). you have pasted all the instructions.

Select g. id, g. name from table as g

G indicates the table alias. if the table name is long, it can be replaced by an alias,

Database name. table name. field name
Complete Writing is like this.

Find out if there is any as g in the entire sentence. If yes, g is the alias. G. name is the name field in the data of this alias.
For example
Select g. name, c. name from table1 as g, table2 as c

If not, g may be the database name.
Select g. name from table

Oh, it's an alias. how is this alias defined? is it AS g?

As can be default

Select g. * from tbl_name as g
Select g. * from tbl_name g

Yes.

Okay. thank you. you have fixed it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.