Обсуждение: weird SQL statement question
Ok, so I installed the latest version of Postresql (8.02) on a WinXP SP2 machine..
My question is why won't the statement SELECT * FROM table work, whereas the statement SELECT * FROM »table« works!
And, to explain a bit more, here's another example:
INSERT INTO TestTable (Name, Surname) VALUES ('name', 'surname'); .. this DOESN'T work
INSERT INTO »TestTable« (»Name«, »Surname«) VALUES ('name', 'surname'); .. this DOES work
Any ideas? J
Regards,
Tadej
At 01:55 PM 4/23/05, Tadej Kanizar wrote:
>Ok, so I installed the latest version of Postresql (8.02) on a WinXP SP2
>machine..
>
>My question is why won't the statement SELECT * FROM table work, whereas
>the statement SELECT * FROM »table« works!
>
>And, to explain a bit more, here's another example:
>
>INSERT INTO TestTable (Name, Surname) VALUES ('name', 'surname'); .. this
>DOESN'T work
>
>INSERT INTO »TestTable« (»Name«, »Surname«) VALUES ('name', 'surname'); ..
>this DOES work
If you create a table using quotes and mixed-case, you will need quotes
every time you reference the table. Don't use quotes when you create the
table and you won't need them when you acces the table with other commands.
Quoting Frank Bax <fbax@sympatico.ca>: > At 01:55 PM 4/23/05, Tadej Kanizar wrote: > > >Ok, so I installed the latest version of Postresql (8.02) on a WinXP > SP2 > >machine.. > > > >My question is why won't the statement SELECT * FROM table work, > whereas > >the statement SELECT * FROM �table� works! > If you create a table using quotes and mixed-case, you will need > quotes > every time you reference the table. Don't use quotes when you create > the > table and you won't need them when you acces the table with other > commands. I don't suppose that the original poster actually named the table "table"? In which case, being a keyword, it will ALWAYS need quotes. "Dreams come true, not free." -- S.Sondheim, ITW