I have a little silly question. I installed PostgreSQL DB Server, but when I run the query, there is a problem with the column id without quotes. I do not know why quotes are needed around identifiers. My request:
SELECT vc."CAR_ID" FROM "VEL_CAR" vc, "VEL_DRIVER" vd, "VEL_DRIVER_CAR" vdc WHERE vc."CAR_ID" = vdc."CAR_ID" and vdc."DRIVER_ID" = vd."DRIVER_ID";
My practice with Oracle DB should not be used. "So, in Oracle:
SELECT vc.CAR_ID FROM VEL_CAR vc, VEL_DRIVER vd, VEL_DRIVER_CAR vdc WHERE vc.CAR_ID = vdc.CAR_ID and vdc.DRIVER_ID = vd.DRIVER_ID;
When I run this query without quotes in PostgreSQL, it throws a syntax error:
ERROR: column vc.car_id does not exist LINE 1: SELECT vc.CAR_ID
Do you know why?
- solvable - Thanks, now I solved the problem! It was about creating tables. I created the table objects using pgAdminIII, and I wrote the table name and uppercased column names. pgAdminIII created a query with quotas - because the names were in uppercase. Thus, the request should have been written with quotas.
source share