SQL INSERT INTO: Add Data to Tables
To insert data into a table, you can use the INSERT INTO statement in SQL. The specific syntax is as follows:
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
table_name is the name of the table where data will be inserted, column1, column2, column3 are the column names where data will be inserted, and value1, value2, value3 are the specific values to be inserted.
For example, if you want to insert a record into a table named students, you can use the following SQL statement:
INSERT INTO students (name, age, gender)
VALUES ('Alice', 20, 'female');
This inserted a record into the students table with the name Alice, age 20, and female gender.