In this section you will learn about describing the allowable syntax for identifiers in MySQL.In this section you will learn about describing the allowable syntax for identifiers in MySQL.
In this section you will learn about describing the
allowable syntax for identifiers in MySQL. The identifiers are Database, table,
index, column and alias name. The following table describes the maximum length
for each type of identifier.
Some restriction on the character, which may appear in identifier are given below :
MySQL allows names that have single identifier or multiple identifiers. The multiple part name of components can be separated by period ?.? Characters and initial parts of multiple-part name work as qualifiers that affect the context within which the final identifier is interpreted
You can refer to a column any of the following form in MySQL.
If a multiple-part name of any component need the quoting then quote them individually rather than the name as a whole. For example, you have to write ?Emp-table?.?Emp-column? rather than ?Emp-table.Emp-column?. You should not specify tbl-name or db_name.tbl_name prefix to a column reference in a statement until the reference would be ambiguous. For example ? Table1 and Table2 both have column age and we retrieve the column age by a SELECT statement that used by both table. In this situation, column age is ambiguous because it is not unique and both tables used it in the statement. That?s why we have to qualify the column age with a table name as table1.age or table2.age for indicating which table you mean.