07 - Create a Table and Insert Data in SQL Server (Video)
Learn how to create a SQL Server table and insert sample data with simple SQL examples, practical tips, and a video lesson.
2026-08-27 ยท 2 min read
Hello my friend! In this lesson, we create a table and add sample data using SQL Server. We use CREATE TABLE to make the table and INSERT to add rows.
1. Create a table
This example creates a table called Students. It has three columns:
StudentIDstores each student's ID.StudentNamestores the student's name.Agestores the student's age.
CREATE TABLE Students (
StudentID INT PRIMARY KEY,
StudentName NVARCHAR(100) NOT NULL,
Age INT
);
PRIMARY KEY makes each student ID unique. NOT NULL means a student name must have a value.
2. Insert data
Use INSERT INTO to add rows. List the column names and provide a value for each one:
INSERT INTO Students (StudentID, StudentName, Age)
VALUES
(1, N'Sokha', 20),
(2, N'Dara', 22);
The N before a text value tells SQL Server to treat it as Unicode text. This is useful for names written in languages such as Khmer.
3. Check the data
Use SELECT to see the rows you added:
SELECT StudentID, StudentName, Age
FROM Students;
Watch the Video
This SQL Server lesson shows how to create a table and insert data.
Tips
- Choose a suitable data type for each column.
- Use a primary key to identify each row.
- Specify column names in
INSERTso it is clear which value goes where. - Use
N'...'for Unicode text values in SQL Server. - Check your table name and database before running SQL statements.