Re: [SQL] create table and data types

2006-02-14 Thread Bath, David
On Tue, 2006-02-14 at 22:12 +0100, Maciej Piekielniak wrote: (snipped) >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); On Wed, 15 Feb 2006 09:42, Ken Hill wrote: (snipped)

Re: [SQL] create table and data types

2006-02-14 Thread Ken Hill
On Tue, 2006-02-14 at 23:03 +0100, Maciej Piekielniak wrote: Hello Ken, Tuesday, February 14, 2006, 10:30:34 PM, you wrote: KH> 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

Re: [SQL] create table and data types

2006-02-14 Thread Tom Lane
Maciej Piekielniak <[EMAIL PROTECTED]> writes: > Is anybody know how create field in a new table with data type accuiring > from a field in other table? Sorry, the %TYPE syntax only works in function declarations at the moment. It could possibly be made to work in table declarations --- there

Re: [SQL] create table and data types

2006-02-14 Thread Maciej Piekielniak
Hello Ken, Tuesday, February 14, 2006, 10:30:34 PM, you wrote: KH> 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 ta

Re: [SQL] create table and data types

2006-02-14 Thread Ken Hill
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 o

[SQL] create table and data types

2006-02-14 Thread Maciej Piekielniak
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 ); -- Best regards, Maciej mailto:[EMAIL PROTECTED] ---