📅  最后修改于: 2023-12-03 15:33:42.893000             🧑  作者: Mango
In PL/SQL, the Insert statement is used to add data to a table. This SQL command is used to insert data into an existing table in a database.
The syntax for the SQL Insert statement is as follows:
insert into table_name (column1, column2, column3, ...)
values (value1, value2, value3, ...);
table_name
: name of the table which the data will be inserted.column_name
: specify the column names that you want to insert data into.value
: specify the value for each column (corresponding to the order of the columns in the column_list
).Suppose we have a table named "Student" with columns: StudentID
, Name
, Age
, Gender
, Address
.
Now, we want to add a new row with the following data:
The insert statement will be:
insert into Student (StudentID, Name, Age, Gender, Address)
values (1001, 'John', 20, 'M', '123 Main St.');
Inserting data into a table is a common operation in PL/SQL programming. By using the Insert statement, we can easily add data to an existing table.