How to query the database name in mysql

藏色散人
Release: 2021-12-28 11:01:33
Original
21976 people have browsed it

Mysql method of querying the database name: 1. Use the "show databases;" statement to query the database name; 2. Use the status statement to query, such as "currrent database:***", where *** is the current The name of the database where it is located.

How to query the database name in mysql

The operating environment of this article: Windows 7 system, mysql version 5.6, Dell G3 computer.

mysql How to query the database name?

You can use these two methods to view the database name:

1. Use the show databases; statement;

2. Use the status statement to see the query results. One line is current database:***. Here *** is the name of the current database.

1. Open the mysql console and enter the password;

How to query the database name in mysql

2. To enter the database, you must first enter show databases;

How to query the database name in mysql

3. To use which database, you must first enter the use table name, such as use nowasp;

How to query the database name in mysql

4. To know which tables are in this database Just enter the command show the database in step 3. Such as show nowasp;

How to query the database name in mysql

5. After that, you can use a large number of sql statements to operate the tables you need to achieve the purpose of learning sql statements, such as viewing the data in the table select * from accounts;

How to query the database name in mysql

Recommended study: "mysql video tutorial"

The above is the detailed content of How to query the database name in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!