MySQL data table operations

Source: Internet
Author: User

1. Create table table name (name char), sex enum (' Male ', ' female '),..... );

2. View all tables in the database show tables from database name; 3. View column information in the table show colunms from table name; /desc table name; 4. Add a column ALTER TABLE user add password char () [After name/first];5. Modify column name and type ALTER TABLE name change old column name new column name data type; 6. Repair Change the type of the column ALTER TABLE name modify column name data type; 7. Modify the location of the column ALTER TABLE user modify column 1 type after column 2;8. Delete column ALTER TABLE table name drop column name; 9. Modify Tables Name ALTER TABLE old table name rename to new table name; 10. Delete Table drop tables Table 1, table 2, ...;

MySQL data table operations

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.