How to Query Database Name in Oracle SQL Developer?

前端 未结 7 1549
自闭症患者
自闭症患者 2020-12-29 20:28

How do I query the database name in Oracle SQL Developer? I have tried the following and they all fail:

SELECT DB_NAME();

SELECT DATABASE(

7条回答
  •  死守一世寂寞
    2020-12-29 21:05

    You can use the following command to know just the name of the database without the extra columns shown.

    select name  from v$database;
    

    If you need any other information about the db then first know which are the columns names available using

    describe v$database;
    

    and select the columns that you want to see;

提交回复
热议问题