SQL INSERT

INSERT is a DML (Data Manipulation Language) command in Structured Query Language (SQL) used to add new records (rows) into a table in a database.

Key Points about INSERT
1. INSERT command adds new data to a table.
2. It is part of DML commands.
3. Values must match the column data types.
4. You can insert single or multiple rows.

Syntax

INSERT INTO table_name (column1, column2, column3)
VALUES (value1, value2, value3);

Example

INSERT INTO Students (ID, Name, Age)
VALUES (1, 'Rahul', 20);

This command adds a new row to the Students table.


Short definition
INSERT is used to add new records into a database table.


Topics