SQL INSERT into statement

Source: Internet
Author: User

INSERT into statement

The INSERT INTO statement is used to insert a new row into the table.

Grammar
INSERT into table name values (value 1, value 2,....)

We can also specify the columns for which you want to insert data:

INSERT into table_name (column 1, column 2,...) Values (value 1, value 2,....)
Insert a new line "Persons" table: City
LastName FirstName Address
Carter Thomas Changan Street Beijing
SQL statements:
INSERT into Persons VALUES (' Gates ', ' Bill ', ' xuanwumen ', ' Beijing ')
Results: City
LastName FirstName Address
Carter Thomas Changan Street Beijing
Gates Bill Xuanwumen 10 Beijing
Insert the data "Persons" table in the specified column: City
LastName FirstName Address
Carter Thomas Changan Street Beijing
Gates Bill Xuanwumen 10 Beijing
SQL statements:
INSERT into Persons (LastName, Address) VALUES (' Wilson ', ' champs-elysees ')
Results: City
LastName FirstName Address
Carter Thomas Changan Street Beijing
Gates Bill Xuanwumen 10 Beijing
Wilson Champs-elysees

SQL INSERT into statement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.