<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>User_all_tables on Oracle Scripts</title><link>https://www.oraclescripts.com/tags/user_all_tables/</link><description>Recent content in User_all_tables on Oracle Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>OracleScripts.com</copyright><lastBuildDate>Thu, 07 Mar 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://www.oraclescripts.com/tags/user_all_tables/index.xml" rel="self" type="application/rss+xml"/><item><title>Oracle DBMS_METADATA.GET_DDL: Extract Object DDL</title><link>https://www.oraclescripts.com/post/extracting-object-ddl-in-oracle-database-9i-onwards/</link><pubDate>Thu, 07 Mar 2024 00:00:00 +0000</pubDate><guid>https://www.oraclescripts.com/post/extracting-object-ddl-in-oracle-database-9i-onwards/</guid><description>
&lt;h2 id="oracle-dbms_metadataget_ddl-extract-object-ddl"&gt;Oracle DBMS_METADATA.GET_DDL: Extract Object DDL&lt;/h2&gt;
&lt;h2 id="purpose"&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Oracle 9i introduced the &lt;code&gt;DBMS_METADATA&lt;/code&gt; package. It can retrieve object definitions as DDL or as XML. The function &lt;code&gt;GET_DDL&lt;/code&gt; turns that ability into a single query. You give it an object type, an object name and a schema. It returns the creation statement as a CLOB.&lt;/p&gt;
&lt;p&gt;A DBA needs this when a table must be copied to another database, when a change must be written down before it is made, or when someone asks how an object was built. The query below returns the DDL of one table. Two &lt;code&gt;SET&lt;/code&gt; commands come first. Without them, SQL*Plus can cut the output or wrap it in headings.&lt;/p&gt;</description></item></channel></rss>