MySQL database learning-1. Get the original data

Source: Internet
Author: User
Show databasesshow tablesinformation_schema The output of the show tables statement does not contain the temporary table.   View all databases on the server > Show databases: view the create database statement of a given database> show create database db_name View the data table of the default database or the data table of a given Database > Show tables from db_name View Create table statement for a given database data table > Show create table tbl_name View the column or index information in a data table > Show columns from tbl_name> show index from tbl_name The following statement is the same as the show columns from tbl_name statement. > Describe tbl_name> explain tbl_name View descriptive information of data tables in the default database or given Database > Show Table Status> show table status from db_name Limit the output range of show statements. You can also change the like statements to where statements, The where statement does not change the number of columns, but only the number of output rows. If the name in the data column is a reserved word It must be enclosed in reverse quotation marks. > Show columns from tbl_name like '% s'> show columns from tbl_name like' _ s'> show columns from tbl_name where 'key' = 'pri'

Mysqlshow command

Database managed by the mysqldump command server Mysqlshow (If the host is rejected, the host is provided. The user name and password are as follows. If the host has changed the default port, the port must be provided in uppercase p-p format) > Mysqlshow MySQL -H localhost-u root-P List data tables of a given Database > Mysqlshow Db_name View the data column information in a given data table > Mysqlshow Db_name tbl_name View the index information in a given data table > Mysqlshow -- Keys db_name tbl_name View the description of a data table in a given Database > Mysqlshow -- Status db_name   List the structure information of the data table in the given database (if the -- no-data parameter is not added, all the data in the table will be listed at the same time) > Mysqldump -- No-data db_name [tbl_name]-u root-p | more
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.