In Oracle, you can use the SELECT statement to query the database name. The function of this statement is to extract the specified data. The syntax is "SELECT name FROM v$database;".
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
First, we double-click to open the SQL PLUS software
Then enter the user name: system, enter the password and press the Enter key to log in, as shown in the figure :
Then enter the following query code:
SELECT name FROM v$database;
Finally you can view the name of the database, as shown in the figure:
Recommended tutorial: "Oracle Tutorial》
The above is the detailed content of How to query the database name in oracle. For more information, please follow other related articles on the PHP Chinese website!