Hellooo!
I'm trying to create a table in a piece of sql and wanted to make sure that the table's one column is definitely the same as a column in another table that is already created.
For this end I thought I could use the following syntax:
CREATE TABLE temp_asns(asn_asn_id asns.asn_id%TYPE)
Except this doesn't work. I assume this is because I'm getting confused and the %TYPE syntax is actually PL/SQL so I can't use it.
If this is the case, is there any other way of basing the column's datatype on a column in another table? I thought of maybe using the AS syntax on CREATE TABLE but I still need to define columns so that doesn't look hopeful!
Any ideas?
Cheers,
Pete
I'm trying to create a table in a piece of sql and wanted to make sure that the table's one column is definitely the same as a column in another table that is already created.
For this end I thought I could use the following syntax:
CREATE TABLE temp_asns(asn_asn_id asns.asn_id%TYPE)
Except this doesn't work. I assume this is because I'm getting confused and the %TYPE syntax is actually PL/SQL so I can't use it.
If this is the case, is there any other way of basing the column's datatype on a column in another table? I thought of maybe using the AS syntax on CREATE TABLE but I still need to define columns so that doesn't look hopeful!
Any ideas?
Cheers,
Pete