Basic operation of MySQL data table

Source: Internet
Author: User


Here is a list of the outlines that will be given in advance, as well as examples of what to do tomorrow:


First, create a data table

1) syntax for creating tables

2) using PRIMARY KEY constraints

3) using FOREIGN KEY constraints

4) Using non-null constraints

5) Use of uniqueness constraints

6) Use default constraints

7) Set the property value of the table to automatically increase


Second, view the data table structure

1) View the table basic Structure statement DESCRIBE

2) View Table detail Structure Statement show CREATE table


Third, modify the data table

1) Modify the table name

2) Modify the data type of the field

3) Modify the field name

4) Add Field

5) Delete Field

6) Modify the position of the field

7) Change the storage engine for the table

8) Delete the foreign KEY constraint for the table


Iv. Deleting Data sheets

1) Delete tables that are not associated

2) Delete the main table associated with the other table


V. Basic operation of the database-comprehensive case

Basic operation of MySQL data table

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.