MySQL data Delete, delete, update operation

Source: Internet
Author: User

1. Inserting data

Reference: Insert

Does not specify a specific field name, the inserted data corresponds to the order in which the fields in the table are defined

INSERT [into] VALUES | VALUE (value_list);

List specified fields

INSERT [into] VALUES | Value 1, value 2,.. Value n);

Insert multiple records at one time

INSERT [into] tbl_name[(field name ...) ]values (Value ...), (Value ...) ...;

Inserting data records with set form

INSERT [into] SET Field 1=value1[, field 2=value2,... Field N=vlauen];

Inserting the results of a query into a table

INSERT [into] tbl_name[(field name,...) ]SELECTfrom[WHERE condition ];

2. Updating data

UPDATE SET Field 1= value 1[, field 2= value 2,.. field n= value n][WHERE where_condition][ORDER by ... ][LIMIT row_count]

3. Delete data

DELETE  from [WHERE where_condition] [ORDER by ... ][LIMIT row_count];

Empty the tabular data

TRUNCATE [TABLE] tbl_name;

MySQL data Delete, delete, update operation

Related Article

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.