Oracle Show View Definition
. .
Oracle Show View Definition
Get Table View Materialized View Package Index Definition in Oracle We often need to get the definition of the table index views etc in Oracle to replicate the structure in another Oracle database Oracle has a very useful command to find the metadata definition of the various structures . .
In Oracle to retrieve the SQL used to create a Function Package etc the user source view can be queried However views are not included in this view nor do they exist in the underlying sys source 291 1 2 6. Add a comment. 5 Answers. Sorted by: 29. View definitions are stored in the information schema: SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'yourviewname' Share. Improve this answer. Follow. answered Apr 10, 2017 at 13:33. mustaccio. 25.5k 22 56.
Oracle Show View DefinitionIf you would like to see the actual SQL used to create the view you can use the function dbms_metadata.get_ddl, which returns a clob: select dbms_metadata.get_ddl ( 'VIEW' , 'MY_VIEW' -- view name ) from dual. There are a. I tried to query ALL VIEWS to get the text definition of the view Problem is ALL VIEWS defines the TEXT column as type LONG Column definitions for ALL VIEWS can be found here http docs oracle cd B19306 01 server 102 b14237 statviews 2117 htm REFRN20305