With help of this command show databases;
I can see databases in MySQL.
How to show the available databases in Oracle?
There is column named 'Name' in V$database view. So you can use following query to find out the database name which is connected. The Complexsql is the database name on which the user is connected. The second method for finding out database name is using global_name system table.
To do this we use a procedure called dbms_output. put_line to place the results in a buffer that SQL*Plus will retrieve and display. SQL*Plus must be told to retrieve data from this buffer in order to display the results. The SQL*Plus command 'set serveroutput on' causes SQL*Plus to retrieve and display the buffer.
SELECT owner, table_name FROM all_tables; This query returns the following list of tables that contain all the tables that the user has access to in the entire database.
SELECT NAME FROM v$database;
shows the database name in oracle
You can think of a MySQL "database" as a schema/user in Oracle. If you have the privileges, you can query the DBA_USERS
view to see the list of schemas:
SELECT * FROM DBA_USERS;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With