
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How should I display MySQL database that is currently in use?
We can display the name of MySQL database that is currently in use by Select Database() command.
mysql> select database(); +------------+ | database() | +------------+ | tutorial | +------------+ 1 row in set (0.00 sec)
This command shows that we currently use tutorial database.
- Related Articles
- When should I use MySQL compressed protocol?
- Which datatype should I use for flag in MySQL?
- When should I use a composite index in MySQL?
- How should I store data into my Mysql database, what type should I assign to a column storing salt values?
- How can I display all databases in MySQL and for each database show all tables?
- How can I set a MySQL database to use MyISAM by default?
- How can we display a list of currently existing MySQL databases on the server?
- What ECMAScript 6 features can I currently use in web browsers?
- Should I use COUNT(*) to get all the records in MySQL?
- How can I see the constraints which are applied to a table stored in the database I am currently using?
- Can I use InnoDB and MyISAM tables in a single database in MySQL?
- How do I remove a MySQL database?
- How can I see the constraints which are applied to a table stored in another database then I am currently using?
- How can I get the list of columns from a table in the database we are currently using?
- Display MySQL Database, Table, and Column Information

Advertisements