cancel
Showing results for 
Search instead for 
Did you mean: 

View Defination

Former Member
0 Kudos
79

How to get view defination in HANA by query?

View Entire Topic
Ravi_Channe
Active Contributor
0 Kudos

Hi Sunny,

Use the following statement:

SELECT view_name, schema_name, definition FROM views WHERE schema_name = 'MYSCHEMA';

You can even say SELECT * and use the column definition to get the SQL code for the view.

I hope you are talking about DB views and not Information model views.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravindra,

Thanks for the reply.

Actually i wanted to know how to get metadata/column names of a view/table.

Ravi_Channe
Active Contributor
0 Kudos

select schema_name, table_name, column_name from table_columns where table_name = 'MYTABLE';

select schema_name, table_name, column_name from view_columns where view_name = 'MYVIEW';

Or you can say select * ....

Regards,

Ravi