This page provides the sample student and student_sum datasets used throughout the SQL tutorials. You can copy a complete dump into a practice database and then run the SELECT, WHERE, GROUP BY, JOIN and aggregate examples against the same data.
DROP TABLE IF EXISTS before a dump, any existing table with that name is removed. Do not run destructive setup statements against production data.This version keeps the IDs from the sample dataset but does not generate them automatically. The ID is still the primary key, so each value must be unique.
The records below match the SQL dumps on this page. This also corrects two old display-only mismatches: Arnold has mark 55 and Kenn Rein has mark 96.
Show Records of Student Table| id | name | class | mark | gender |
|---|---|---|---|---|
| 1 | John Deo | Four | 75 | female |
| 2 | Max Ruin | Three | 85 | male |
| 3 | Arnold | Three | 55 | male |
| 4 | Krish Star | Four | 60 | female |
| 5 | John Mike | Four | 60 | female |
| 6 | Alex John | Four | 55 | male |
| 7 | My John Rob | Five | 78 | male |
| 8 | Asruid | Five | 85 | male |
| 9 | Tes Qry | Six | 78 | male |
| 10 | Big John | Four | 55 | female |
| 11 | Ronald | Six | 89 | female |
| 12 | Recky | Six | 94 | female |
| 13 | Kty | Seven | 88 | female |
| 14 | Bigy | Seven | 88 | female |
| 15 | Tade Row | Four | 88 | male |
| 16 | Gimmy | Four | 88 | male |
| 17 | Tumyu | Six | 54 | male |
| 18 | Honny | Five | 75 | male |
| 19 | Tinny | Nine | 18 | male |
| 20 | Jackly | Nine | 65 | female |
| 21 | Babby John | Four | 69 | female |
| 22 | Reggid | Seven | 55 | female |
| 23 | Herod | Eight | 79 | male |
| 24 | Tiddy Now | Seven | 78 | male |
| 25 | Giff Tow | Seven | 88 | male |
| 26 | Crelea | Seven | 79 | male |
| 27 | Big Nose | Three | 81 | female |
| 28 | Rojj Base | Seven | 86 | female |
| 29 | Tess Played | Seven | 55 | male |
| 30 | Reppy Red | Six | 79 | female |
| 31 | Marry Toeey | Four | 88 | male |
| 32 | Binn Rott | Seven | 90 | female |
| 33 | Kenn Rein | Six | 96 | female |
| 34 | Gain Toe | Seven | 69 | male |
| 35 | Rows Noump | Six | 88 | female |
For current MySQL examples, the table uses a primary key, InnoDB and utf8mb4. Integer display widths such as INT(2) or INT(3) are not needed.
CREATE TABLE `student` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL DEFAULT '',
`class` VARCHAR(10) NOT NULL DEFAULT '',
`mark` INT NOT NULL DEFAULT 0,
`gender` VARCHAR(6) NOT NULL DEFAULT 'male',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
See AUTO_INCREMENT, PRIMARY KEY constraints, and MySQL data types.
Download the complete student SQL dump as a text file
This version lets MySQL generate the next ID for future inserts while retaining the original IDs in the supplied sample rows.
The student_sum table is used by tutorials that calculate totals, percentages and subject-wise results. See SUM and multiple columns.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.