Ying Lu <ying_lu@cs.concordia.ca> wrote:
> Hello,
>
> I have a table named "USER" under MySQL database. When I am trying to
> move tables from MySQL to PostgreSQL, I found that I could not create a
> table namely "USER". I guess "USER" is a key string used by PostgreSQL
> system so that we could not create a table named "USER". Is that true?
Yes and no.
"user" is a SQL reserved word, which means _no_ SQL database _should_ let
you create a table by that name.
However, if you acutally enclose the name in quotes, you can safely work
around that restriction, i.e.:
CREATE TABLE "USER" AS ...
Be warned that when you enclose the table name in quotes, it becomes
case-sensitive, thus you will have to enclose it in quotes every time
you use it or the names won't match.
A better solution would be to take this opportunity to make your table
names more SQL compliant.
HTH.
--
Bill Moran
Potential Technologies
http://www.potentialtech.com