on 07-08-2013 8:18 AM
Hello frnds ,
I have a table called "HEALTH" in the SCHEMA "EC2"
I want to know that how to get all the column names of the table through query????
Regards
Qaiser Imam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont see the view "PUBLIC"."COLUMNS"
Like Ravindra Channe mentioned, TABLE_COLUMNS would be the best option in case we dont have all privileges.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I stand corrected! Ha!
The COLUMNS view has been deprecated (https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.04/en-US/a7142827fb2e4581991d3d84a3...) and the deprecation has been documented since HANA 2 SP03. Interestingly the view wasn't even documented before. Goes to show how many details get silently changed over time.
In my case I don't have access to SYS.COLUMNS table, so I used the view "SYS"."M_CS_COLUMNS"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In HANA Database, under Catalog, go to Public Synonyms folder. In this folder, you find a table called M_CS_ALL_COLUMNS. If you run the table you will get all the schema names, table names, all the column names used in all repositories(schema) in this database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.