MySQL Read and write separation Operation action basis (basic basis for reading and writing separation)

Source: Internet
Author: User

Read the operation:

1.select

2.show

3.explain

Explain shows how MySQL uses indexes to process SELECT statements and join tables. Can help select better indexes and write more optimized query statements.

4.desc

4.use

Write the operation:

2.delete

3.update

4.insert

5.drop

6.truncate Clear Table Data

7.creat

8. The rename command is used to modify the table name.

Rename command format: Rename table name to the new table name;

9 alter

. Modification of table structure
(1) Add a field format:
ALTER TABLE table_name Add column (field name fields type); ----This method with parentheses
(2) Specify where the field is inserted:
ALTER TABLE table_name ADD column Name field type after a field;
Delete a field:
ALTER TABLE table_name DROP field name;
(3) Modify field name/type
ALTER TABLE table_name change old field name new field name type of new field;

Modifying the Database Engine
ALTER TABLE table_name Engine=myisam | InnoDB;

MySQL Read and write separation Operation action basis (basic basis for reading and writing separation)

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.