Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle view ddl

-- 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', 'VIEW_NAME', '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;
Comment

oracle ddl

-- 4000 characters max
SELECT dbms_metadata.get_ddl('PROCOBJ', 'job_name', 'owner') FROM DUAL;
SELECT dbms_metadata.get_ddl('PROCOBJ', 'program_name', 'owner') FROM DUAL;
SELECT dbms_metadata.get_ddl('TABLE', 'table_name', 'owner') FROM DUAL;
SELECT dbms_metadata.get_ddl('VIEW', 'view_name', 'owner') FROM DUAL;

SELECT dbms_metadata.get_ddl('PACKAGE', 'pkg_name', 'owner') FROM DUAL; 
SELECT dbms_metadata.get_ddl('PROCEDURE', 'proc_name', 'owner') FROM DUAL; 

SELECT dbms_metadata.get_ddl('INDEX', 'index_name', 'owner') FROM DUAL;
SELECT dbms_metadata.get_ddl('TYPE', 'type_name', 'owner') FROM DUAL;
Comment

PREVIOUS NEXT
Code Example
Sql :: how to define a save method in ruby for sqlite3 databases 
Sql :: how to export/import a mysql database via ssh 
Sql :: postgresql remove duplicate rows 2 columns 
Sql :: sql query inner join 3 tables 
Sql :: how to get specific salary in sql 
Sql :: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 
Sql :: sql alter column name sql server 
Sql :: mysqli inner join (php) 
Sql :: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: 
Sql :: substring sql 
Sql :: soql more than today 
Sql :: on update current_timestamp jpa 
Sql :: sql output select 
Sql :: sql server order by nulls last 
Sql :: how to select all fieldsin a soql query 
Sql :: how to get max from each department in sql 
Sql :: sqrt(i) 
Sql :: query to find third highest salary 
Sql :: concat all rows in sql postgres 
Sql :: sql join on comma separated field 
Sql :: json to dynamic columns in sql 
Sql :: like query 
Sql :: delete record mysql 
Sql :: sql table 
Sql :: insert multiple rows from another table sql 
Sql :: left join in sql oracle 
Sql :: sql select rows with simlar names 
Sql :: trunc sysdate in oracle 
Sql :: order by with where clause in mysql 
Sql :: mysql copy table rows from one database to another 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =