0% found this document useful (0 votes)
4 views1 page

Lec 40 Create Table

The document outlines the creation of a 'Students' table with columns for student name, subject, and marks. It includes SQL commands to insert marks for seven students (Alice, Bob, Charlie, David, Eve, Frank, and Grace) across three subjects (Math, Science, and English). Each student's marks are specified in the insert statements.

Uploaded by

khutela12112004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Lec 40 Create Table

The document outlines the creation of a 'Students' table with columns for student name, subject, and marks. It includes SQL commands to insert marks for seven students (Alice, Bob, Charlie, David, Eve, Frank, and Grace) across three subjects (Math, Science, and English). Each student's marks are specified in the insert statements.

Uploaded by

khutela12112004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATE TABLE Students (

student_name VARCHAR(100),
subject VARCHAR(100),
marks INT
);

INSERT INTO Students (student_name, subject, marks)


VALUES
-- Marks for Alice
('Alice', 'Math', 85),
('Alice', 'Science', 88),
('Alice', 'English', 92),

-- Marks for Bob


('Bob', 'Math', 90),
('Bob', 'Science', 78),
('Bob', 'English', 85),

-- Marks for Charlie


('Charlie', 'Math', 85),
('Charlie', 'Science', 82),
('Charlie', 'English', 80),

-- Marks for David


('David', 'Math', 92),
('David', 'Science', 91),
('David', 'English', 89),

-- Marks for Eve


('Eve', 'Math', 90),
('Eve', 'Science', 85),
('Eve', 'English', 87),

-- Marks for Frank


('Frank', 'Math', 75),
('Frank', 'Science', 72),
('Frank', 'English', 78),

-- Marks for Grace


('Grace', 'Math', 85),
('Grace', 'Science', 89),
('Grace', 'English', 90);

You might also like