Showing posts with label How to get the create statement of sql view. Show all posts
Showing posts with label How to get the create statement of sql view. Show all posts

Thursday, 7 April 2011

How to get the create statement of sql view


How to get the create statement of sql view

SELECT owner "view owner name", view_name "view name"
FROM all_views
WHERE view_name = :view_name

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