cancel
Showing results for 
Search instead for 
Did you mean: 

Show list of all schemas

Former Member
0 Kudos

Is there a syntax that I can use to view/show all schemas? I'm trying to familiarize myself with the basics of HANA SQL syntax so I can use it from the command-line from time-to-time rather than relying on the studio. In mysql you can use "SHOW DATABASES" but "SHOW" doesn't seem to be recognized.

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor

Hi Jonathon

SHOW is not a standard SQL command, but a convenience command used by some DBMS.

Typically in SAP HANA you would use the Object Navigator to review the schemas as specific user can access.

Alternatively you can simply run

select * from schemas

to retrieve a list of all schemas.

- Lars

Former Member

Thanks!

Answers (2)

Answers (2)

former_member182302
Active Contributor
0 Kudos

Adding to the already detailed discussion,

if you are using HDBSQL to login to HANA, you can use this command:

Regards,

Krishna Tangudu

Former Member
0 Kudos

I think you accidentally left out the command.

former_member182302
Active Contributor
0 Kudos

Oops sorry here is the command:

Regards,

Krishna Tangudu

former_member186082
Active Contributor
0 Kudos

Hi Jonathan,

As Lars said, you can use SCHEMAS table to see info on all schemas.

SELECT * FROM SCHEMAS;

Adding to that, refer to this, you will know other system tables and views.

http://help.sap.com/hana/SAP_HANA_SQL_and_System_Views_Reference_en.pdf

Regards,

Chandra.