Inserting Data

INSERT Statement: Used to add new records to a table.Syntax:

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

Example:

INSERT INTO employees (first_name, last_name, salary, department_id)
VALUES ('Jane', 'Doe', 70000, 10);

Explanation: This adds a new employee named Jane Doe with a salary of 70,000 in department 10. Each value corresponds to the specified column.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *