Skip to content

Commit

Permalink
Updated content of SQL indentifiers and key words as per PG docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhibhammar committed Jan 31, 2025
1 parent e94e0d9 commit a161d9d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ redirects:

Tokens such as `SELECT`, `UPDATE`, or `VALUES` are examples of *key words*, that is, words that have a fixed meaning in the SQL language. The tokens `MY_TABLE` and `A` are examples of *identifiers*. They identify names of tables, columns, or other database objects, depending on the command you use them in. Therefore, they're sometimes called *names*. Key words and identifiers have the same *lexical structure*, meaning that you can't know whether a token is an identifier or a key word without knowing the language.

SQL identifiers and key words must begin with a letter (`a-z` or `A-Z`). Subsequent characters in an identifier or key word can be letters, underscores, digits (`0-9`), dollar signs (`$`), or the number sign (`#`).
SQL identifiers and key words must begin with a letter (`a-z` or `A-Z`) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (`0-9`), dollar signs (`$`), or the number sign (`#`). However the dollar signs (`$`) are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable. The SQL standard will not define a key word that contains digits or starts or ends with an underscore, so identifiers of this form are safe against possible conflict with future extensions of the standard.

Identifier and key word names aren't case sensitive. Therefore these two commands are equivalent:

Expand Down

0 comments on commit a161d9d

Please sign in to comment.