Reputation: 147
I want to retrieve the column names of a table (e.g., MAIN_ENGINE_DATA
), under a specific schema (e.g., APP) using an SQL query.
How can I achieve this in Apache Derby?
Upvotes: 2
Views: 1453
Reputation: 147
Ok, I found the solution. The SQL query would be like:
SELECT COLUMNNAME FROM SYS.SYSCOLUMNS INNER JOIN SYS.SYSTABLES ON SYS.SYSCOLUMNS.REFERENCEID = SYS.SYSTABLES.TABLEID WHERE TABLENAME = 'MAIN_ENGINE_DATA'
Upvotes: 2