Skip to content
Advertisement

SQL create table column AS SELECT FROM OTHER TABLE

My problem is I cannot create proper DDL statement ‘create table’ with column based on 2 columns from other table.

The final table should looks like after:

I was trying something like this:

Result:

SQL Error: ORA-00936: missing expression

Result:

SQL Error: ORA-01773: may not specify column datatypes in this CREATE TABLE

Result:

SQL Error: ORA-00907: missing right parenthesis

Advertisement

Answer

You need a create and an insert statement:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement