CREATE TABLE employees (
id INT PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(50),
last_name VARCHAR(50),
age INT,
department VARCHAR(50)
);
2. Insert data into the employees table:
INSERT INTO employees (first_name, last_name, age, department)
VALUES ('John', 'Doe', 30, 'Engineering');
INSERT INTO employees (first_name, last_name, age, department)
VALUES ('Jane', 'Smith', 28, 'Marketing');
INSERT INTO employees (first_name, last_name, age, department)
VALUES
('Alice', 'Johnson', 35, 'HR'),
('Bob', 'Brown', 40, 'Finance');
This covers the basics of the INSERT INTO statement in SQL. By following these examples, you can efficiently insert data into your database tables.