MySQL Learning summary----data manipulation

Source: Internet
Author: User

MySQL Learning summary----data manipulation

=================================================================================

First, the operation of the data

=================================================================================



=================================================================================

Second, insert data

=================================================================================

The insert record is divided into:

"" Insert the complete record

"Insert part of the data record

"" Insert multiple data records

(i), insert the complete data record

Insert into table name (property name 1, property name 2, property name 3,......, property name N) VALUES (value1,value2,value3,......, Valuen);

Insert into table name values (value1,value2,value3,......, Valuen);

1. Insert two data into table qiuuuu in database Doublelinux

mysql> INSERT INTO qiuuuu (id,name,sex,class,address)

VALUES (1, ' James ', ' Man ', ' 2 ', ' no ');

Query OK, 1 row affected (0.07 sec)


Mysql> SELECT * from Qiuuuu;

+------+-------+------+-------+---------+

| ID | name | sex | Class | Address |

+------+-------+------+-------+---------+

| 1 | James | Mans | 2 | No |

+------+-------+------+-------+---------+

1 row in Set (0.00 sec)


mysql> INSERT INTO qiuuuu

VALUES (2, ' Allen ', ' Man ', ' 1 ', ' no ');

Query OK, 1 row affected (0.01 sec)


Mysql> SELECT * from Qiuuuu;

+------+-------+------+-------+---------+

| ID | name | sex | Class | Address |

+------+-------+------+-------+---------+

| 1 | James | Mans | 2 | No |

| 2 | Allen | Mans | 1 | No |

+------+-------+------+-------+---------+

2 rows in Set (0.00 sec)

(b), insert part of the data record



(iii) inserting multiple data records




=================================================================================

Third, update the data

=================================================================================




=================================================================================

Iv. deletion of data

=================================================================================






This article from "Doublelinux" blog, declined reprint!

MySQL Learning summary----data manipulation

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.