I tried using EVERSQL to validate the following code but its also showing error
You have an error in your SQL syntax; it seems the error is around: 'NOT NULL, DepartmentID int NOT NULL, CategoryID int NOT NULL, CourseName V' at line 2
this is my SQL query,
CREATE TABLE Course (
CourseID varchar NOT NULL,
deptID int NOT NULL,
catID int NOT NULL,
CourseName Varchar NOT NULL,
Credit varchar NOT NULL,
PRIMARY KEY (CourseID),
FOREIGN KEY (deptID) REFERENCES department(deptID),
FOREIGN KEY (catID) REFERENCES coursecategory(catID)
);
and this is the error I'm getting
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOT NULL,
deptID int NOT NULL,
catID int NOT NULL,
CourseName ...' at line 2