Populating rows in a table using SQL


#1

Hi there. I just started out coding in SQL and have made it about 5/11 steps into the first module of the course. The issue I am having is populating rows in a table using the INSERT INTO command. I have tried to use the statement in Microsoft Access but it tells me there is a Syntax error in the create table statement.

I’m not quite sure what is happening here so I’d like to see if anyone else can help me out.

Here is the code I am using.

CREATE TABLE Students (
Student_Name varchar(255),
Gender varchar(255),
DateOfBirth date,
CountryOfOrigin varchar(255)
);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘John Smith’, ‘Male’, 10/05/1990, ‘UK’);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘Sam Adams’, ‘Male’, 19/03/1987, ‘USA’);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘Tsing Tao’, ‘Male’, 04/12/1989, ‘China’);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘Kronen Berg’, ‘Female’, 02/01/1991, ‘Germany’);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘Sapporo Asahi’, ‘Female’, 27/08/1990, ‘Japan’);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘Hein Eken’, ‘Male’, 21/ 01/1992, ‘Netherlands’);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘Amstel Becks’, ‘Female’, 16/10/1989, ‘Germany’);

INSERT INTO Students (Student_Name, Gender, DateOfBirth, CountryOfOrigin)
VALUES (‘Corona Pacifico’, ‘Female’, 07/07/1987, ‘Mexico’);

SELECT * FROM Students;

Many thanks!