Hi, I was trying to create a table "Unit1" from "employees" table by using Create Table..As statement. I was supposed to add two extra columns Total_sal ,active in the "Unit1". So that i have mentioned "null as total_sal","null as active" in the select statement but it throws an error stats that ORA-01723: zero-length columns are not allowed. This is my query.
create table unit1
(
em_id primary key,
emp_name,
salary ,
start_date,
Total_sal ,
comm,
active
)
organization index
as
select employee_id,first_name||' '||last_name,salary,hire_date,null as total_sal,commission_pct,null as active from employees where employee_id < 115