MySQL Basic notes (iv)-Data basic operations

Source: Internet
Author: User

Data manipulation

New data: two different options.

1, plan one, to insert data into the whole table field, do not need to specify a list of fields, the order of the data must appear in accordance with the design of the table in the order in which the fields appear. Any non-numeric data that needs to be wrapped using quotation marks (single quotes are recommended).

 1insertintovalues(Value list)[, (Value list)];    -- You can insert multiple records at once. 

2, scenario two, to insert data for some fields, you need to select the field list, the field list appears in the order of the field is independent of the order, but the value list must match the order of the selected fields.

1 Insert  into Values (Value list) [, (Value list)];

  View data:

1 Select */  from  [where Condition ]; --View All data

1 -- View the specified field, specifying the condition data 2 Select where = a value;

  Update data

 1updateset=[where condition];

Delete data

Delete  from [where Condition ];


Previous page: MySQL basic Note (iii)-table operation Basics

MySQL Basic notes (iv)-Data basic operations

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.