当前位置:网站首页>How to query all tables in MySQL

How to query all tables in MySQL

2022-06-21 20:07:00 Yisu cloud

How to query mysql All the tables in

This article mainly introduces “ How to query mysql All the tables in ” Knowledge about , Xiaobian shows you the operation process through practical cases , The operation method is simple and fast , Practical , Hope this article “ How to query mysql All the tables in ” The article can help you solve problems .

Inquire about mysql Methods for all tables in the database :1、 perform “mysql -u root -p” Command and enter the password to log in mysql database The server ;2、 perform “USE Database name ;” Command to switch to the specified database ;3、 perform “show tables;” or “SHOW FULL TABLES;” command , Will be listed in tabular form mysql All the tables in the database .

 How to query mysql All the tables in

The operating environment of this tutorial :windows7 System 、mysql8 edition 、Dell G3 The computer .

stay mysql in , You can use SHOW TABLES Statement to query all tables in the database ; The statement is in the MySQL List all tables in the database .

Query steps :

1、 Execute the following command to log in mysql database server

mysql -u root -p

 How to query mysql All the tables in

2、 Switch to the specified database (mydb):

USE mydb;

 How to query mysql All the tables in

3、 List mydb All the tables in the database :

show tables;

 How to query mysql All the tables in

You can see ,mydb It's in the database 4 Tables :contacts、mip_demo、tb_dept、users

SHOW TABLES The command shows whether the table is a base table or a view . To include table types in results , Please use SHOW FULL TABLES sentence , As shown below -

 How to query mysql All the tables in

About “ How to query mysql All the tables in ” That's all for , Thanks for reading . If you want to know more about the industry , You can pay attention to the Yisu cloud industry information channel , Xiaobian will update different knowledge points for you every day .

原网站

版权声明
本文为[Yisu cloud]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206211827199100.html