0% found this document useful (0 votes)
8 views5 pages

SQL Create Table Insert Practice

The document is a SQL practice worksheet designed to help students learn how to create tables and insert data into them. It includes 20 practical questions, each requiring the creation of a specific table and the insertion of a set number of records. Basic SQL syntax for creating tables, inserting values, and selecting data is also provided for reference.

Uploaded by

fk3537259
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

SQL Create Table Insert Practice

The document is a SQL practice worksheet designed to help students learn how to create tables and insert data into them. It includes 20 practical questions, each requiring the creation of a specific table and the insertion of a set number of records. Basic SQL syntax for creating tables, inserting values, and selecting data is also provided for reference.

Uploaded by

fk3537259
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQL Practice Worksheet

Topic: CREATE TABLE and INSERT INTO VALUES - 20 Practical Questions

Learning Goal: Students will create table structures and insert real records into those tables. After every
question, run SELECT * FROM table_name; to check the output.

Basic Syntax
CREATE TABLE is used to create the structure of a table. INSERT INTO VALUES is used to store data inside
that table.
CREATE TABLE table_name (
column1 datatype,
column2 datatype,
column3 datatype
);

INSERT INTO table_name VALUES


(value1, value2, value3);

SELECT * FROM table_name;

Practice Questions
1. Student Table
Create a table named students with these columns: student_id INT, student_name VARCHAR(50), age INT,
course VARCHAR(50).

Insert 5 students data into the table.

2. Teacher Table
Create a table named teachers with these columns: teacher_id INT, teacher_name VARCHAR(50), subject
VARCHAR(50), salary INT.

Insert 4 teachers data.

3. Course Table
Create a table named courses with these columns: course_id INT, course_name VARCHAR(50), duration
VARCHAR(30), fees INT.

Insert 5 course records.

4. Employee Table
Create a table named employees with these columns: emp_id INT, emp_name VARCHAR(50), department
VARCHAR(50), salary INT.

Insert 5 employee records.

5. Product Table
Create a table named products with these columns: product_id INT, product_name VARCHAR(50), price
INT, quantity INT.

Insert 6 products data.

6. Customer Table
Create a table named customers with these columns: customer_id INT, customer_name VARCHAR(50),
city VARCHAR(50), mobile VARCHAR(15).

Insert 5 customer records.

Vision Tech Education | SQL Practice Page 1


7. Book Table
Create a table named books with these columns: book_id INT, book_name VARCHAR(80), author
VARCHAR(50), price INT.

Insert 5 book records.

Vision Tech Education | SQL Practice Page 2


8. Admission Table
Create a table named admissions with these columns: admission_id INT, student_name VARCHAR(50),
course_name VARCHAR(50), admission_date DATE.

Insert 5 admission records. Date format example: 2026-04-29.

9. Fees Table
Create a table named fees with these columns: fee_id INT, student_name VARCHAR(50), total_fee INT,
paid_fee INT.

Insert 5 fee records.

10. Marks Table


Create a table named marks with these columns: roll_no INT, student_name VARCHAR(50), subject
VARCHAR(50), marks INT.

Insert 6 marks records.

11. Library Members Table


Create a table named library_members with these columns: member_id INT, member_name
VARCHAR(50), class_name VARCHAR(30), mobile VARCHAR(15).

Insert 5 member records.

12. Laptop Table


Create a table named laptops with these columns: laptop_id INT, brand VARCHAR(50), ram VARCHAR(20),
price INT.

Insert 5 laptop records.

13. Hospital Patient Table


Create a table named patients with these columns: patient_id INT, patient_name VARCHAR(50), age INT,
disease VARCHAR(50).

Insert 5 patient records.

14. Orders Table


Create a table named orders with these columns: order_id INT, customer_name VARCHAR(50),
product_name VARCHAR(50), amount INT.

Insert 5 order records.

Vision Tech Education | SQL Practice Page 3


15. Attendance Table
Create a table named attendance with these columns: attendance_id INT, student_name VARCHAR(50),
total_days INT, present_days INT.

Insert 5 attendance records.

16. City Table


Create a table named cities with these columns: city_id INT, city_name VARCHAR(50), state_name
VARCHAR(50), population INT.

Insert 5 city records.

17. Movie Table


Create a table named movies with these columns: movie_id INT, movie_name VARCHAR(80), actor_name
VARCHAR(50), rating FLOAT.

Insert 5 movie records.

18. Bank Account Table


Create a table named bank_accounts with these columns: account_id INT, holder_name VARCHAR(50),
account_type VARCHAR(30), balance INT.

Insert 5 bank account records.

19. Vehicle Table


Create a table named vehicles with these columns: vehicle_id INT, vehicle_name VARCHAR(50),
vehicle_type VARCHAR(30), price INT.

Insert 5 vehicle records.

20. Institute Batch Table


Create a table named batches with these columns: batch_id INT, batch_name VARCHAR(50), course_name
VARCHAR(50), timing VARCHAR(30).

Insert 5 batch records.

Vision Tech Education | SQL Practice Page 4


Example Solution Format
Students can follow this pattern for every question.
CREATE TABLE students (
student_id INT,
student_name VARCHAR(50),
age INT,
course VARCHAR(50)
);

INSERT INTO students VALUES


(1, 'Rahul', 20, 'O Level'),
(2, 'Priya', 21, 'Python'),
(3, 'Aman', 19, 'ADCA'),
(4, 'Neha', 22, 'Full Stack'),
(5, 'Ravi', 20, 'Data Analytics');

SELECT * FROM students;

Teacher Note
Table banana means structure create karna. INSERT INTO ka use us structure ke andar real data store
karne ke liye hota hai.

Class flow: first CREATE TABLE, then INSERT INTO, then SELECT * FROM table_name to verify output.

Vision Tech Education | SQL Practice Page 5

You might also like