-1

every time I want to create this table, it says Missing Right Parenthesis. Can someone please check what i have wrong please. Thank you

CREATE TABLE Pet
(
PetID Int NOT NULL PRIMARY KEY,
OwnerID Char (7) NOT NULL,
TypeID Char integer NOT NULL,
PetName Char (30),
Description Char (50),
Birthday VarChar (255),
LastVisit VarChar (255)
);
Hellz Yeahh
  • 63
  • 1
  • 5
  • 5
    What's "Char integer"? – Otávio Décio Jan 29 '16 at 03:01
  • Try commenting out lines to see which one is causing the problem. According to Oracle's site for 10g, you can use `/*` and `*/` to comment out lines. I'm assuming it's the same for 11g. If the table gets created with only one line commented out, you know which one is the problem. I would suggest commenting out the line for `OwnerID` first because it seems odd/incorrect. – Dave F Jan 29 '16 at 03:18
  • 1
    Otávio Décio is right. TypeID Char integer NOT NULL, should be TypeID integer NOT NULL, OR (less likely given it's an ID) TypeID Char () NOT NULL, – Bug Maker Jan 29 '16 at 03:41

1 Answers1

1
CREATE TABLE Pet 
(
PetID Int NOT NULL PRIMARY KEY,
OwnerID Char (7) NOT NULL,
TypeID Char NOT NULL,
PetName Char (30),
Description Char (50),
Birthday VarChar (255),
LastVisit VarChar (255)
);

Check this column data type Char Or Integer - TypeID

Siva G
  • 98
  • 8