Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

')' IS NOT VALID AT THIS POSITION EXPECTING AN IDENTIFIER

CREATE DATABASE Lab101;
CREATE TABLE STUDENTS(
StudentID varchar(50),
Name varchar(50),
Gender varchar(50),
DOB date ,
Address varchar(50)
)
INSERT INTO STUDENTS (StudentID, Name, Gender, DOB, Address)
VALUES ('S01','Ali','Male','2 Feb 1996','Kuala Lumpur');
INSERT INTO STUDENTS (StudentID, Name, Gender, DOB, Address)
VALUES ('S02','Nancy','Female','16 May 1997','Bukit Jalil');
INSERT INTO STUDENTS (StudentID, Name, Gender, DOB, Address)
VALUES ('S03','Melvin','Male','20 Nov 1998','NULL');
INSERT INTO STUDENTS (StudentID, Name, Gender, DOB, Address)
VALUES ('S04','Angeline','Female','30 Dec 1995','Sri Petaling');

I have an ERROR in the first INSERT statement now. It says INSERT is not valid at the position

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You have an extra comma at

Address varchar(50),

It should be

CREATE TABLE STUDENTSS(
StudentID varchar(50),
Name varchar(50),
Gender varchar(50),
DOB date ,
Address varchar(50)
)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading