Re: create table and data types

Поиск
Список
Период
Сортировка
От Ken Hill
Тема Re: create table and data types
Дата
Msg-id 1139952634.3083.72.camel@localhost.localdomain
обсуждение исходный текст
Ответ на create table and data types  (Maciej Piekielniak <piechcio@isb.com.pl>)
Ответы Re: create table and data types
Список pgsql-sql
On Tue, 2006-02-14 at 22:12 +0100, Maciej Piekielniak wrote: <blockquote type="CITE"><pre>
<font color="#000000">Hello pgsql-sql,</font>

<font color="#000000">  Is anybody know how create field in a new table with data type accuiring from a field in other
table?</font>
<font color="#000000">  For example:</font>

<font color="#000000">create table new_table</font>
<font color="#000000">( </font>
<font color="#000000"> name other_table.name%TYPE</font>
<font color="#000000">); </font>

</pre></blockquote> Have you tried inheritance from one table to the new table?<br /><br /> CREATE TABLE new_table
(new_column)<br/>      INHERITS (old_table)<br /><br /> All columns in 'old_table' will be inclueded in 'new_table'
plusthe column 'new_column'.  

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

Предыдущее
От: Ken Hill
Дата:
Сообщение: Re: Non Matching Records in Two Tables
Следующее
От: Maciej Piekielniak
Дата:
Сообщение: Re: create table and data types