Created
June 29, 2025 02:53
-
-
Save danielkwood/a384fd7ed01cd137995381861637512c to your computer and use it in GitHub Desktop.
SQL code: Create Students table and insert sample data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Create the Students table | |
| CREATE TABLE Students ( | |
| StudentID INT PRIMARY KEY, | |
| FirstName VARCHAR(50), | |
| LastName VARCHAR(50), | |
| YearLevel INT, | |
| AverageScore INT | |
| ); | |
| -- Insert sample data into Students table | |
| INSERT INTO Students (StudentID, FirstName, LastName, YearLevel, AverageScore) VALUES | |
| (101, 'Emma', 'Lee', 11, 85), | |
| (102, 'Jack', 'Smith', 12, 78), | |
| (103, 'Mia', 'Patel', 11, 92), | |
| (104, 'Liam', 'Johnson', 12, 88), | |
| (105, 'Zoe', 'Brown', 10, 74); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment