MySQL commonly used additions and deletions to change the command (pure record.) The basic skills of ORM are gone. )

Source: Internet
Author: User

To update the table data:

Update table_name set xxx=where condition;

Add Field:

Alter Table Add field type other;e.g: Alter Table Add int (4default'0';

To delete a field:

ALTER TABLE DROP Field_name;

To increase the DROP index:

# Add Alter Table Add  Index index name (field name 1[, field name 2 ...) ]); # delete altertabledrop index index name;

Add Data:

Insert  into table_name (<field1>[]values (<  >[, (<value_n >]);

Delete data:

Delete  from where condition;

Modify Table Name:

Table  to Other_table_name;

To delete a data table:

Drop table table_name;

Reference:

Http://c.biancheng.net/cpp/html/1456.html

MySQL commonly used additions and deletions to change the command (pure record.) The basic skills of ORM are gone. )

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.