问题
Whats wrong with this query : I am getting following error
SQL Error: ORA-00905: missing keyword 00905. 00000 - "missing keyword"
it says error at 4th row. Please advise
CREATE TABLE ORDERS
(
ID INT NOT NULL,
ord_date DATE,
AMOUNT double,
CUSTOMER_ID INT references CUSTOMERS(ID),
PRIMARY KEY (ID)
);
回答1:
You missed to add precision
in double
datatype
CREATE TABLE ORDERS
(
ID INT NOT NULL,
ord_date DATE,
AMOUNT double precision,
CUSTOMER_ID INT references CUSTOMERS(ID),
PRIMARY KEY (ID)
);
SQLFIDDLE DEMO
For more info check here
回答2:
You can use BIGINT
or DECIMAL
type for double type.
来源:https://stackoverflow.com/questions/28522646/sql-error-missing-keyword