Hi all.
@George1111
Oracle hasn't the concept of AUTOALLOCATE field (I think you mean AUTOINCREMENT field, as Access). Unique values are generated using sequences.
@Endorphin.
I don't understand your requirement. Using the statement
you'll get in TABLE2 a full copy of all rows extracted by the query, so id's value of TABLE2 will be the same id's values of TABLE1.Code:INSERT INTO TABLE2 (id, name, attribute) SELECT (id, name, attribute) FROM TABLE1 WHERE name = :name
If you want different values, you should use sequences; first create a sequence, for example SEQ_ID_TABLE2, then you can write something like this
I hope this will help you.Code:INSERT INTO TABLE2 (id, name, attribute) SELECT (SEQ_ID_TABLE2.NEXTVAL, name, attribute) FROM TABLE1 WHERE name = :name




Reply With Quote