By 25/02/2016 2 Comments

What Is INSERT INTO Statement In SQL?

  • The INSERT INTO SQL statement inserts a new record/row in a database table.

Types of INSERT INTO Statement:

  • The first type of INSERT INTO statement does not specify¬†column names of ¬†a database table, it only specifies values.
  • When you use this type of INSERT INTO statement you must insert all values which matches with table column names.

Syntax:

INSERT INTO table_name
VALUES (value1,value2,value3,...);

Example:

INSERT INTO tbl_users
VALUES(1, "demo user", "user");

  • The second type of INSERT INTO statement specifies both column names and values of a database table.
  • When you use this type of INSERT INTO statement you must insert all values which matches with specified table column names.

Syntax:

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

Example:

INSERT INTO tbl_users (user_comment, surname)
VALUES("demo user", "admin");






← Previous Tutorial


Posted in: Sql

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .