SQL INSERT STATEMENT
SQL INSERT statement is a SQL query. It is used to insert a single or a multiple records in a table.
There are two ways to insert data in a table:
- By SQL insert into statement
- By specifying column names
- Without specifying column names
- By SQL insert into select statement
1) Inserting data directly into a table
You can insert a row in the table by using SQL INSERT INTO command.
There are two ways to insert values in a table.
In the first method there is no need to specify the column name where the data will be inserted, you need only their values.
- INSERT INTO table_name
- VALUES (value1, value2, value3....);
The second method specifies both the column name and values which you want to insert.
No comments:
Post a Comment