Why am I getting this SQL error? ORA-00907: missing right parenthesis

83 views Asked by At

I have been trying to create a table using Oracle SQL, but no matter what I do I get the error ORA-00907: missing right parenthesis. I know I am not missing a parentheses, so this is extremely frustrating. What am I doing wrong?

This is the code I tried. I have no idea what's missing.

CREATE TABLE PET 
(
    Pet_ID INT (4) PRIMARY KEY, 
    Owner_First CHAR (15) NOT NULL, 
    Owner_Last CHAR (15) NOT NULL, 
    Pet_Name CHAR (15) NOT NULL, 
    Breed CHAR (15),
    Weight DECIMAL (5,2),
    Age INT (2)
);

Edit: Each variable is on its own line. Idk why it won't display the way it is typed when I made my post. Anyways, here's a screenshot. Code

1

There are 1 answers

0
Paritosh Darekar On

The syntax looks okay; however, the issue could be with data type you've used here .. i.e. INT.. please try using Pet_ID NUMBER(4)