A table with two names or table alias

From: Tk421 <vrobador(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: A table with two names or table alias
Date: 2008-07-25 12:12:47
Message-ID: 4889C33F.2040702@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Can I create a table name alias?

What i want is to access the same table with two different names. An
example:

I've the table CITY with fields code and name. I want to know if i
can create an alternative name to table CITY, like LOCATION, to make
possible these two sentences:

insert into CITY values (10, 'New York');
insert into LOCATION values (11, 'Paris')

Thank you.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2008-07-25 12:23:50 Re: A table with two names or table alias
Previous Message Anoop G 2008-07-25 10:02:42 Re: postgres time zone settings(time difference in Server and client)