Student Exam Database Part 2: How to Insert data to Table in Database with data download

Student Exam Database Part 2: How to Insert data to Table in database speak khmer

There different ways to add data to the database table like input one by one, insert script, and import data from the file.
You can download all example data that show in the video with download links below.
In this tutorial about Student Exam Database, I show you how to insert data by writing INSERT INTO STATEMENT in MySQL



Learn More Introduction to Database (SQL) in Khmer with videos: Chapter 1 | Chapter 2 | Chapter 3
Syntax:
INSERT INTO TableName VALUES(value1, value2,...);
◾value1, value2,...: can be number, text, date or datetime ◾Number: 101 (don't need to add anything extra) ◾Date: 2023-03-14 (formart: YYYY-MM-DD for PostgreSQL, MySQL, Microsoft SQL Server)

Here are some example of INSERT statement for differences Tables Since there some are relationship involve so some tables may need to insert data after another table already inserted. Tables that can insert First: Students and Teacher and second is table Courses and lastly is table Exam.

◾Students table
INSERT INTO Students VALUES (1,'Vannin','M','2000-09-05','Battambang'),
    (2,'Theary','M','1997-04-15','Preah Sihanouk');

◾Teachers table
INSERT INTO Teachers VALUES (1,'Vorleak','Lecturer'),
    (2,'Chayan','Professor');

◾Courses table
INSERT INTO `courses` VALUES (1,'Biology',1),(2,'Chemistry',2)

◾Exam table
INSERT INTO Exam VALUES (1,1,5),(1,2,9)

Free Khmer Ebook Download (PDF): Database | Microsoft Access | Python Programming

EP15 របៀបបញ្ចូលទិន្នន័យតាម SQL INSERT សម្រាប់ Student Exam Database

Download Data that show in the video above here






Previous Post Next Post