GummyBear21
GummyBear21

Reputation: 1301

What is the meaning of "$" in MySQL?

Example:

SELECT * FROM table1 WHERE $.``.age > 20

I have tried the following

Valid queries:

Invalid queries

       select * from table1 where $.\`table1\`.age > 20 

Upvotes: 2

Views: 71

Answers (1)

Álvaro González
Álvaro González

Reputation: 146460

$ is valid in unquoted identifiers but doesn't have any special meaning as far as I know. You could replicate your question with any other text:

mysql> select *
    -> from information_schema.engines
    -> where typewhateverhere.``.transactions='YES';
+--------+---------+------------------------------------------------------------+--------------+------+------------+
| ENGINE | SUPPORT | COMMENT                                                    | TRANSACTIONS | XA   | SAVEPOINTS |
+--------+---------+------------------------------------------------------------+--------------+------+------------+
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
+--------+---------+------------------------------------------------------------+--------------+------+------------+
1 row in set (0.00 sec)

I don't have the faintest idea of what does syntax mean for MySQL, though, it doesn't seem documented among Identifier Qualifiers.

Upvotes: 1

Related Questions