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) > Have you tried restructuring the table with CREATE TABLE AS...? > Try this: > CREATE TABLE new_table > (id, mynewfield, mynewfield2) > AS SELECT id FROM old_table); I use a similar technique, but add a "WHERE 1=0" so the new table is empty. Of course, more than a single table can be referenced in the FROM clause. -- David T. Bath [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match