MySQL data manipulation (DML) command

Source: Internet
Author: User

Inserting data

Do not specify a specific field name

INSERT [into] tbl_name values| Value (values ...);

List specified fields

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

Insert multiple records at one time

INSERT [into] tbl_name [(Field name,...)] Values (value,...), (value,...);

Inserting records with Set form

INSERT [into] tbl_name SET field name = value, ...;

Inserting query records into a table

INSERT [into] tbl_name [(field name, ...)] SELECT field name from Tbl_name [WHERE condition];

Update data

UPDATE tbl_name SET Field name = value, ... [WHERE condition] [ORDER by field name] [Limits limit number of bars];

Delete data

DELETE from Tbl_name [WHERE condition] [ORDER by field name] [Limit number of bars];

Clear the data sheet completely

TRUNCATE [TABLE] tbl_name;


This article is from the "zgw285763054" blog, make sure to keep this source http://zgw285763054.blog.51cto.com/11591804/1879331

MySQL data manipulation (DML) command

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.