How to create a table using SQL in Oracle -
i'm trying create simple table it's giving me error says:
error starting @ line 1 in command:
drop table deleted_employees
error report:
sql error: ora-00942: table or view not exist
00942. 00000 - "table or view not exist"error starting @ line 2 in command:
create table deleted_employees
error @ command line:2 column:30
error report:
sql error: ora-00906: missing left parenthesis
00906. 00000 - "missing left parenthesis"error starting @ line 3 in command:
(
employee_id number(6,0),
first_name varchar2(20 byte),
last_name varchar2(20 byte),
email varchar2(20 byte),
phone_number varchar2(20 byte) ,
hire_date date ,
jobe_id varchar2(10 byte),
salary number(8,2),
commission_id number(2,2),
manager_id number(6,0),
department_id number(4,0)
)error @ command line:4 column:2
error report:
sql error: ora-00928: missing select keyword
00928. 00000 - "missing select keyword"
script:
drop table deleted_employees; create table deleted_employees; ( employee_id number(6,0), first_name varchar2(20 byte), last_name varchar2(20 byte), email varchar2(20 byte), phone_number varchar2(20 byte) , hire_date date , job_id varchar2(10 byte), salary number(8,2), commission_id number(2,2), manager_id number(6,0), department_id number(4,0) )
i can't figure problem out, can help?
the first error, ora-00942, because table doesn't exist first time run this; you're expecing that, it's bit ugly.
the second because have stray semicolon @ end of first line of create statement. error message isn't entirely helpful wrong. rest knock-ons that, tries interpret rest of command, , can't...
create table deleted_employees ( employee_id number(6,0), first_name varchar2(20 byte), last_name varchar2(20 byte), email varchar2(20 byte), phone_number varchar2(20 byte) , hire_date date , job_id varchar2(10 byte), salary number(8,2), commission_id number(2,2), manager_id number(6,0), department_id number(4,0) )
Comments
Post a Comment