MySQL most common action statement summary

Source: Internet
Author: User

This article mainly introduced the MySQL most common Operation statement summary, with the table and the library related these statements is the study MySQL most basic knowledge, needs the friend may refer to under

Here are a few days I have been using a few commands, first write down, will be a copy of the MySQL detailed use of the document

Note: [] to represent the name, you need to replace the library name or table name

Show All libraries:

?

1 show databases;

To enter a library:

?

1 use [dbname];

Show All tables:

?

1 Show tables;

Displays the field configuration for a table:

?

1 describe [Tbname];

Or

?

1 Show full fields from [Tbname];

To create a library:

?

1 Create DATABASE [dbname];

To delete a table:

?

1 drop database [dbname];

To delete a table:

?

1 drop table [Tbname];

Import Create script:

?

1 Mysql-u[user]-P [dbname] < [Create.sql]

(If you do not have a password, you do not need-p)

Shows the status of data storage for each table, and so on:

?

1 Show Table Status G;

That's it.

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.