"date" as a column name "date" as a column name oracle oracle

"date" as a column name


Have you tried

select calendars.date from calendars; /* or you could alias "calendars" if you don't want to type so much */

If that doesn't work or help, have you tried dropping the column (and maybe try referencing it with the table name prefix: calendars.date)?


I also found this post: How do I escape a reserved word in Oracle?

It seems that Oracle will be case-sensitive if you use double quotes so

select "date" from calendars;

is not the same as

select "Date" from calendars;


Try escaping the reserved word with double quotes.

select "date" from calendars


date is a reserved keyword and hence cannot be used like

SELECT date from some table

there can be multiple solutions for the problem

  • The date column needs to be enclosed within the brackets like

SELECT [date] FROM tableName

  • Enclose the reserved keyword in backticks

SELECT 'date' from tableName

  • Use alias

SELECT tableName.date from tableName