Home > Database > Mysql Tutorial > body text

What are the default rules used by the parser when parsing built-in function names?

WBOY
Release: 2023-09-17 15:45:22
forward
933 people have browsed it

What are the default rules used by the parser when parsing built-in function names?

In fact, when the parser encounters a word that is the name of a built-in function, it must determine whether the name represents a function call or a non-expression reference to an identifier. For example Table or column name. Consider the following query -

1. Select sum(salary) from employee;
2. Create table sum (i int);
Copy after login

In the first query, SUM is a reference to the function call and in the second query, it is a reference to the table name.

The parser follows the following rules to distinguish whether their names are used as identifiers in a function call or non-reference context -

  • Rule1 - The names When used as a function call in an expression, there must be no spaces between the name and the following characters (bracket characters).
  • Rule2 - Instead, use the function name as the identifier, which cannot be followed by parentheses.

The above is the detailed content of What are the default rules used by the parser when parsing built-in function names?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template