Answers for "use of view in oracle"

SQL
2

oracle get view definition

-- Views (use USER_VIEWS or DBA_VIEWS if needed):
SELECT TEXT FROM ALL_VIEWS WHERE upper(VIEW_NAME) LIKE upper('%VIEW_NAME%');
-- Or:
SELECT dbms_metadata.get_ddl('VIEW', 'FLEX_TRADE_AGREG', 'OWNER_NAME') 
	FROM DUAL;

-- Materialized views (use USER_VIEWS or DBA_VIEWS if needed):
SELECT QUERY FROM ALL_MVIEWS WHERE upper(MVIEW_NAME) LIKE upper('%VIEW_NAME%');
-- Or:
SELECT dbms_metadata.get_ddl('MATERIALIZED_VIEW', 'VIEW_NAME', 'OWNER_NAME') 
FROM DUAL;
Posted by: Guest on June-14-2021
3

oracle view

SELECT * FROM USER_VIEWS;		-- Views from connected schema
SELECT * FROM ALL_VIEWS;		-- Views available to connected schema
	SELECT * FROM ALL_VIEWS WHERE OWNER = 'SCHEMA_NAME';
	SELECT * FROM ALL_VIEWS WHERE VIEW_NAME = 'VIEW_NAME';
SELECT * FROM DBA_VIEWS;		-- All database Views
Posted by: Guest on June-14-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language