Best unofficial Apache Server developers community |
|
I have a little silly question. I have installed a PostgreSQL DB Server, but when I run query, there is a problem with column identifier without quotas. I dont know why the quotas around identifiers are needed. My query:
My practice from Oracle DB is not to use ". So in Oracle:
When I run this query without quotas in postgresql it throws error about syntax:
Do you know why?
posted via StackOverflow
|
|
 
|
When you create your tables using double quotes, column and table names become case sensitive. So You need to create your tables without using double quotes, then the names are not case sensitive: See the manual for details: http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS |
|
 
|
Seems to me that the table vc does not have a column named The quotes are optional and you can usually skip them. |
|
 
|
There are two kinds of identifiers:
First one is case insensitive, so you can write car_id or CaR_iD and it's same identifier as quoted "car_id" (such behavior is PostgreSQL oriented and is not compliant with SQL standard, because it should be equivalent to "CAR_ID"). Second one is case sensitive, so "car_id" is diffrent from "CaR_iD". You can find more information at 4.1. Lexical Structure. |
|
 
|
From Postgres documentation :
|