Database: test, Table: class
Class_Num | Class_Name | Class_Section |
1 | CS | Islamabad |
2 | SE | CALIFORNIA
|
Database: test, Table: student
RollN
o |
St_Na
me |
St_Mobile No |
St_Email | St_Class |
1 | ALI | 33333 | [email protected] | Pakistan |
2 | Asad | 333333334 | [email protected] | United States |
Database: test, Table: student_Class
ID | RollN
o |
Class_Nu
m |
1 | 1 | 1 |
2 | 2 | 2 |

SQL Query to insert data into student’s table
1 |
INSERT INTO `student` (`RollNo`, `St_Name`, `St_MobileNo`, `St_Email`, `St_Class`) VALUES ('3'
, 'Robert', '03333', '[email protected]', 'MCS'); |
SQL Query to insert data into a Class table
1 |
INSERT INTO `class` (`Class_Num`, `Class_Name`, `Class_Section`) VALUES ('3', 'mcs', 'A'); |
SQL Query to insert data into the student_class table
1 |
INSERT INTO `student_class` (`ID`, `RollNo`, `Class_Num`) VALUES ('3', '3', '3'); |