Americo
Americo

Reputation: 919

PostgreSQL - Column name of a table is the name of a function

There is a table in my database where on of the column names is called "end". End is a timestamp.

When I try to run a simple query such as:

select end
from driver_shift_log

I get a syntax error because it is interpreting end not as a column name, but as a SQL function. Any tips on the best way to fix this?

Upvotes: 0

Views: 75

Answers (1)

Robert
Robert

Reputation: 25753

Try this way:

select "end"
from driver_shift_log

Sql Fiddle Demo

Upvotes: 2

Related Questions