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'.