Re: A table with two names or table alias

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: A table with two names or table alias
Дата
Msg-id 20080725122350.GF24432@a-kretschmer.de
обсуждение исходный текст
Ответ на A table with two names or table alias  (Tk421 <vrobador@gmail.com>)
Список pgsql-sql
am  Fri, dem 25.07.2008, um 14:12:47 +0200 mailte Tk421 folgendes:
>    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.

You can create a VIEW, and if you want to insert data into the view, you
can create rules for that.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tk421
Дата:
Сообщение: A table with two names or table alias
Следующее
От: Milan Oparnica
Дата:
Сообщение: Re: PERSISTANT PREPARE (another point of view)