sql - Oracle query : Missing Keywords/parenthesis -


i executing sql queries in unix. didn't identify error in query.

create table flights ( route_id number(10) not null, depart_timestamp timestamp time zone not null, arrive_timestamp timestamp time zone not null, base_price_usd number(17,2) not null check (base_price_usd > cast(0.0 clob)::money), status_id integer not null, primary key (route_id, depart_timestamp), foreign key (route_id) references routes(route_id), foreign key (status_id) references route_statuses(status_id) );

error @ line 2:

ora-00905: missing keyword

ora-00907: missing right parenthesis

ok, posting anwser:

1) make check constraint check base_price_usd > 0

2) timestamp time zone data types can't used primary keys.

3) timestamp time zone implemented in oracle 10g. since you're using oracle 8, won't work there. use date type.

i guess add column store time zone. varchar2 , store values 'gmt-6' or something, don't see worth since more recent versions of oracle can store default.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -