Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Why I keep gettng Oracle Right Parenthesis missing error?
CREATE TABLE Owner
( OID integer primary key,
OFirst varchar(30) not null,
LName varchar(30) not null,
DOB Date,
OAddress varchar(75)not null,
VID integer foreign key
);
I don't see any syntax errors yet ORACLE SQL Application Express program keeps saying there is an error! Please help!
Here's the official error: ORA-00907: missing right parenthesis
3 Answers
- ToddLv 79 years agoFavorite Answer
Oracle is looking for a REFERENCES on the line VID integer FOREIGN KEY. You need to specify the reference that the foreign key constraint points to.
According to their website, Oracle prefers syntax like...
CREATE TABLE Owner
( OID integer PRIMARY KEY,
OFirst VARCHAR(30) NOT NULL,
LName VARCHAR(30) NOT NULL,
DOB DATE,
OAddress VARCHAR(75) NOT NULL,
VID INTEGER NOT NULL,
CONSTRAINT VID FOREIGN KEY REFERENCES parent_table (column)
);
- kenzo2047Lv 68 years ago
Like Todd said, you cannot have a FOREIGN KEY specification without saying what table (and column[s]) it references. That is not an Oracle-specific requirement. It is a generic requirement for all relational databases.
- ?Lv 45 years ago
Roll no isn't an acceptabe title for a discipline. In an effort to destroy the code. You do not say what coding language this is, nor what database. Elaborate to inform if something is proper.