10 statements for MySQL entry

Source: Internet
Author: User

1. Look under the current server, what are those libraries (database)?

Answer: show databases;

2. How can I create a database?

A: The database name is the last face of the create, and the semicolon ends

3. Select a database

When you make a table, row, select the database

A: Use behind the Write database name; Select the appropriate database this is a strange one, no semicolons.

4. To select a database to see how the table looks at all the tables below the library?

Answer: show tables;

5. How to delete a database

A: Drop database to write the last name;

6. Modify the Database

Can I modify the name of the database

Answer: No.

phpMyAdmin seems to have this function? He was building a new library and copying all the tables to the new library, which was done by deleting the old library.

7. How to create a table in a database??? To build a table, you first select the database

A: The name of the CREATE table last written

Case: Building a simple table


ATU int,

Name varchar (20),

Age int,

Area varchar (20)


8. How to modify the table name??????

Answer: Rename table name to the new table name;

9. How do I delete a table???

Answer: drop table name;

10. How to view the results of a table?????? Description can be abbreviated as DESC

A: Desc table name;

10 statements for MySQL entry

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.