get database views
CREATE VIEW customer_ro (name, language, credit)
AS SELECT cust_last_name, nls_language, credit_limit
FROM customers
How do i get the names of the aliases(i.e name, language, and cred开发者_如何学JAVAit) with respect to a particular view from the database.(oracle)....
i need to use it via jdbc...
Although views no longer appear in USER_TABLES
, they are still in USER_TAB_COLUMNS
(and DBA_
and ALL_
equivalents). So you can do this:
SELECT COLUMN_NAME
FROM USER_TAB_COLUMNS
WHERE TABLE_NAME = 'CUSTOMER_RO'
ORDER BY COLUMN_ID;
From jdbc you'd parameterise that, but otherwise the same query will work.
精彩评论