sql - ORA-00907: missing right parenthesis (With Examples) -


i'm trying create table in sql.

create table orders (     order_id int(10) not null,     order_date date not null,     total_value varchar(250) default null,     order_status varchar(250) default null,     payment_type_id int(10) not null,     delivery_id int(10) default null,     store_id int(10) not null,     staff_id int(10) default null,     client_id int(10) not null,     sale_type_id int(10) not null ); 

i gives me [err] ora-00907: missing right parenthesis

i don't know why. searched lot, put example:

create table suppliers (     supplier_id number(10) not null,     supplier_name varchar2(50) not null,     contact_name varchar2(50) ); 

and works! it's same mine, why give error?

you dont have define length of int. remove (10)

create table orders ( order_id int not null, order_date date not null, total_value varchar(250) default null, order_status varchar(250) default null, payment_type_id int not null, delivery_id int default null, store_id int not null, staff_id int default null, client_id int not null, sale_type_id int not null ); 

sql fiddle demo


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -