w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Create mysql table, parenthesis error: You have an error in your SQL syntax; check the manual ... for the right syntax to use near ')' at line 12

You have an extra comma in every create table statement. eg PRIMARY KEY (DoctorID) has a trailing comma. MySql expects another column declaration after that comma.

-- Table DOCTOR

CREATE TABLE DOCTOR (
 DoctorID VARCHAR(20) NOT NULL,
 DoctorName VARCHAR(20) NULL DEFAULT NULL,
 PRIMARY KEY (DoctorID)
);




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.