Monday, August 25, 2008

How to get the create statement of sql view

SELECT owner "view owner name", view_name "view name"
FROM all_views
WHERE view_name = '<< YOURVIEW >>'

SELECT DBMS_METADATA.get_ddl ('VIEW', '<< view name >>',
'<< view owner name >>')
FROM DUAL

No comments: