Get VIEW ddl using query

后端 未结 2 1102
挽巷
挽巷 2021-01-02 10:39

For database re-architecture I need to get DDL of each table and view in the database(Oracle). I don\'t want to go to property of each table/view and get SQL out of it in SQ

2条回答
  •  伪装坚强ぢ
    2021-01-02 11:05

    Try the below query for view:

    select text from ALL_VIEWS where upper(view_name) like upper();
    

    For mviews:

    select query from ALL_MVIEWS where upper(mview_name) like upper();
    

提交回复
热议问题