Select columns which are named after reserved keywords

suggest change

When a column name matches a reserved keyword, standard SQL requires that you enclose it in double quotation marks:

SELECT 
    "ORDER",
    ID 
FROM ORDERS

Note that it makes the column name case-sensitive.

Some DBMSes have proprietary ways of quoting names. For example, SQL Server uses square brackets for this purpose:

SELECT 
    [Order],
    ID 
FROM ORDERS

while MySQL (and MariaDB) by default use backticks:

SELECT 
    `Order`,
    id 
FROM orders

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents