Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL ERROR:ORA-01723: zero-length columns are not allowed

DINESH EDVINFeb 24 2016 — edited Feb 24 2016

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

This post has been answered by AndrewSayer on Feb 24 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2016
Added on Feb 24 2016
4 comments
48,285 views