On Tue, 2006-02-14 at 22:12 +0100, Maciej Piekielniak wrote:
Hello pgsql-sql,

  Is anybody know how create field in a new table with data type accuiring from a field in other table?
  For example:

create table new_table
( 
 name other_table.name%TYPE
); 

Have you tried inheritance from one table to the new table?

CREATE TABLE new_table (new_column)
     INHERITS (old_table)

All columns in 'old_table' will be inclueded in 'new_table' plus the column 'new_column'.

Reply via email to