-2

I am a newbie to DBA and I am trying to create a table of vendors and products. Vendor_Name in second line is underlined and when I hover the cursor over it, it shows me a window of error syntax with different lines and I do not understand what they are. After running I receive an error of ORA-00906 "missing left parenthesis."

Create Table Vendor (
Vend_ID VARCHAR2(3) NOT NULL, Primary Key
Vendor_Name VARCHAR(50) NOT NULL,
Vendor_ST VARCHAR(25) NOT NULL,
);

I appreciate any help!

  • 2
    There's no comma between the NOT NULL and the PRIMARY KEY! Oracle messages can be a bitch sometimes! p.s. welcome to the forum! :-) – Vérace Feb 26 at 2:25
2

Attention to details is important. Go back to first principles (syntax) if stuck.

Create Table Vendor (
Vend_ID VARCHAR2(3) NOT NULL primary key,
Vendor_Name VARCHAR(50) NOT NULL,
Vendor_ST VARCHAR(25) NOT NULL
);

fiddle

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.