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 :: remove password from root mysql 
Sql :: $query = mysqli_query($con, $sql); while ($row = mysqli_fetch_array($query)) 
Sql :: sql server for loop 
Sql :: sqlfiddle example tables 
Sql :: display total number of tables in mysql 
Sql :: how to truncate a table in databse 
Sql :: sql order by timestamp 
Sql :: insert into table from another table mysql 
Sql :: add column to table sql 
Sql :: ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 
Sql :: how to get weekday from old date in sql 
Sql :: check mysql port 
Sql :: drop table in mysql 
Sql :: LoadError: cannot load such file -- mysql2/2.7/mysql2 
Sql :: How to View column names of a table in SQL 
Sql :: Uncaught Error: Call to undefined function DatabaseOldmysqli_connect() 
Sql :: select first rows postgresql 
Sql :: Database "mem:testdb" not found, either pre-create it or allow remote database creation (not recommended in secure environments) [90149-200] 90149/90149 (Help) 
Sql :: sql replace character in string in all records 
Sql :: alter table oracle 
Sql :: access mysql command mac xampp 
Sql :: select columns table mysql 
Sql :: fetch first 5 characters of the string in sql 
Sql :: sql server current date minus 5 years 
Sql :: SQL SERVER SELECT BETWEEN DATETIME 
Sql :: create function in postgresql 
Sql :: python sqlite3 prepared statement 
Sql :: sql server arabic collation 
Sql :: sql rank 
Sql :: check if table exists oracle 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =