<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Statements</title>
    <link>/en/sql-reference/statements/</link>
    <description>Recent content in Statements on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/statements/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: ACTIVATE DIRECTED QUERY</title>
      <link>/en/sql-reference/statements/activate-directed-query/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/activate-directed-query/</guid>
      <description>
        
        
        &lt;p&gt;Activates a directed query and makes it available to the query optimizer across all sessions.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ACTIVATE DIRECTED QUERY { &lt;span class=&#34;code-variable&#34;&gt;query-name&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/where-clause/#&#34;&gt;where-clause&lt;/a&gt;&lt;/span&gt; }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;query-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the directed query to activate, as stored in the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/directed-queries/#&#34;&gt;DIRECTED_QUERIES&lt;/a&gt; column &lt;code&gt;query_name&lt;/code&gt;. You can also use &lt;a href=&#34;../../../en/sql-reference/statements/get-directed-query/#&#34;&gt;GET DIRECTED QUERY&lt;/a&gt; to obtain names of all directed queries that map to an input query.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;where-clause&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Resolves to one or more directed queries that are filtered from system table &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/directed-queries/#&#34;&gt;DIRECTED_QUERIES&lt;/a&gt;. For example, the following statement activates all directed queries with the same &lt;code&gt;save_plans_version&lt;/code&gt; identifier:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ACTIVATE DIRECTED QUERY WHERE save_plans_version = 21;
&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/db-superuser/&#34; title=&#34;&#34;&gt;Superuser&lt;/a&gt;
&lt;h2 id=&#34;activation-life-cycle&#34;&gt;Activation life cycle&lt;/h2&gt;
&lt;p&gt;After you activate a directed query, it remains active until it is explicitly deactivated by &lt;a href=&#34;../../../en/sql-reference/statements/deactivate-directed-query/#&#34;&gt;DEACTIVATE DIRECTED QUERY&lt;/a&gt; or removed from storage by &lt;a href=&#34;../../../en/sql-reference/statements/drop-statements/drop-directed-query/#&#34;&gt;DROP DIRECTED QUERY&lt;/a&gt;. If a directed query is active at the time of database shutdown, OpenText™ Analytics Database automatically reactivates it when you restart the database.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/managing-queries/directed-queries/managing-directed-queries/#&#34;&gt;Managing directed queries&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ALTER statements</title>
      <link>/en/sql-reference/statements/alter-statements/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/alter-statements/</guid>
      <description>
        
        
        &lt;p&gt;ALTER statements let you change existing database objects.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: BEGIN</title>
      <link>/en/sql-reference/statements/begin/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/begin/</guid>
      <description>
        
        
        &lt;p&gt;Starts a transaction block.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

BEGIN is a synonym for &lt;a href=&#34;../../../en/sql-reference/statements/start-transaction/#&#34;&gt;START TRANSACTION&lt;/a&gt;.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;BEGIN [ WORK | TRANSACTION ] [ &lt;span class=&#34;code-variable&#34;&gt;isolation-level&lt;/span&gt; ] [ READ [ONLY] | WRITE ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;WORK | TRANSACTION&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Optional keywords for readability only.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;isolation-level&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the transaction&#39;s isolation level, which determines what data the transaction can access when other transactions are running concurrently, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/admin/transactions/read-committed-isolation/&#34;&gt;READ COMMITTED&lt;/a&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/admin/transactions/serializable-isolation/&#34;&gt;SERIALIZABLE&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;REPEATABLE READ (automatically converted to SERIALIZABLE)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;READ UNCOMMITTED (automatically converted to READ COMMITTED)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, see &lt;a href=&#34;../../../en/admin/transactions/#&#34;&gt;Transactions&lt;/a&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;READ [ONLY] | WRITE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the transaction mode, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;READ WRITE (default): Transaction is read/write.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;READ ONLY: Transaction is read-only.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Setting the transaction session mode to read-only disallows the following SQL statements, but does not prevent all disk write operations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;INSERT, UPDATE, DELETE, and COPY if the target table is not a temporary table&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All CREATE, ALTER, and DROP commands&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GRANT, REVOKE, and EXPLAIN if the SQL to run is one of the statements cited above.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Create a transaction with the isolation level set to READ COMMITTED and the transaction mode to READ WRITE:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED READ WRITE;
BEGIN
=&amp;gt; CREATE TABLE sample_table (a INT);
CREATE TABLE
=&amp;gt; INSERT INTO sample_table (a) VALUES (1);
OUTPUT
--------
1
(1 row)

=&amp;gt; END;
COMMIT
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/transactions/#&#34;&gt;Transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/connecting-to/client-libraries/accessing/c/querying-db-using-ado-net/inserting-data-ado-net/creating-and-rolling-back-transactions/#&#34;&gt;Creating and rolling back transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/commit/#&#34;&gt;COMMIT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/end/#&#34;&gt;END&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/rollback/#&#34;&gt;ROLLBACK&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: CALL</title>
      <link>/en/sql-reference/statements/call/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/call/</guid>
      <description>
        
        
        &lt;p&gt;Invokes a &lt;a href=&#34;../../../en/extending/stored-procedures/&#34;&gt;stored procedure&lt;/a&gt; created with &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-procedure-stored/#&#34;&gt;CREATE PROCEDURE (stored)&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CALL [[&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;procedure&lt;/span&gt;( [ &lt;span class=&#34;code-variable&#34;&gt;argument-list&lt;/span&gt;] );
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;[&lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Database and &lt;a href=&#34;../../../en/admin/configuring-db/designing-logical-schema/using-multiple-schemas/setting-search-paths/&#34;&gt;schema&lt;/a&gt;. The default schema is &lt;code&gt;public&lt;/code&gt;. If you specify a database, it must be the current database.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;procedure&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the stored procedure, where &lt;em&gt;&lt;code&gt;procedure&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;argument-list&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of arguments to pass to the stored procedure, whose types correspond to the types of the argument&#39;s &lt;a href=&#34;../../../en/extending/stored-procedures/parameter-modes/&#34;&gt;IN parameters&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superuser: EXECUTE on the procedure&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/extending/stored-procedures/executing-stored-procedures/#&#34;&gt;Executing stored procedures&lt;/a&gt; and &lt;a href=&#34;../../../en/extending/stored-procedures/stored-procedures-use-cases-and-examples/#&#34;&gt;Stored procedures: use cases and examples&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/do/#&#34;&gt;DO&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-procedure-stored/#&#34;&gt;CREATE PROCEDURE (stored)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/drop-statements/drop-procedure-stored/#&#34;&gt;DROP PROCEDURE (stored)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: COMMENT ON statements</title>
      <link>/en/sql-reference/statements/comment-on-statements/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/comment-on-statements/</guid>
      <description>
        
        
        &lt;p&gt;&lt;code&gt;COMMENT ON&lt;/code&gt; statements let you create comments on database objects, such as schemas, tables, and libraries. Each object can have one comment. Comments are stored in the system table 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/comments/#&#34;&gt;COMMENTS&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: COMMIT</title>
      <link>/en/sql-reference/statements/commit/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/commit/</guid>
      <description>
        
        
        &lt;p&gt;Ends the current transaction and makes all changes that occurred during the transaction permanent and visible to other users.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;COMMIT&lt;/code&gt; is a synonym for 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/end/#&#34;&gt;END&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;COMMIT [ WORK | TRANSACTION ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;WORK TRANSACTION&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Optional keywords for readability only.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example shows how to commit an insert.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE sample_table (a INT);
=&amp;gt; INSERT INTO sample_table (a) VALUES (1);
OUTPUT
--------
1
=&amp;gt; COMMIT;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/transactions/#&#34;&gt;Transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/connecting-to/client-libraries/accessing/c/querying-db-using-ado-net/inserting-data-ado-net/creating-and-rolling-back-transactions/#&#34;&gt;Creating and rolling back transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/begin/#&#34;&gt;BEGIN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/rollback/#&#34;&gt;ROLLBACK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/start-transaction/#&#34;&gt;START TRANSACTION&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: CONNECT TO VERTICA</title>
      <link>/en/sql-reference/statements/connect-to/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/connect-to/</guid>
      <description>
        
        
        &lt;p&gt;Connects to another OpenText™ Analytics Database to enable importing and exporting data across databases, with 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/copy-from/#&#34;&gt;COPY FROM VERTICA&lt;/a&gt;&lt;/code&gt; and 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/export-to/#&#34;&gt;EXPORT TO VERTICA&lt;/a&gt;&lt;/code&gt;, respectively.&lt;/p&gt;
&lt;p&gt;After you establish a connection to another database, the connection remains open in the current session until you explicitly close it with 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/disconnect/#&#34;&gt;DISCONNECT&lt;/a&gt;&lt;/code&gt;. You can have only one connection to another database at a time. However, you can establish successive connections to different databases in the same session.&lt;/p&gt;
&lt;p&gt;By default, invoking &lt;code&gt;CONNECT TO VERTICA&lt;/code&gt; uses the OpenText™ Analytics Database&#39;s private network. For information about creating a connection over a public network, see &lt;a href=&#34;../../../en/data-export/db-export-and-import/using-public-and-private-ip-networks/#&#34;&gt;Using public and private IP networks&lt;/a&gt;.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Copy and export operations can fail if either side of the connection is a single-node cluster installed on &lt;code&gt;localhost&lt;/code&gt;.
&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CONNECT TO VERTICA &lt;span class=&#34;code-variable&#34;&gt;db-spec&lt;/span&gt;
    [ USER &lt;span class=&#34;code-variable&#34;&gt;username&lt;/span&gt; ]
    [ PASSWORD &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt;&amp;#39; ] ON &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;host&lt;/span&gt;&amp;#39;, &lt;span class=&#34;code-variable&#34;&gt;port&lt;/span&gt;
    [ TLS CONFIGURATION &lt;span class=&#34;code-variable&#34;&gt;tls_configuration&lt;/span&gt; ]
    [ TLSMODE PREFER ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;db-spec&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The target database, either the database name or &lt;code&gt;DEFAULT&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;username&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The username to use when connecting to the other database. If omitted, the current user&#39;s username is used.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;password&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The password of the user on the target database. If omitted, you can use credential forwarding or mutual TLS to authenticate to the target database. For details, see &lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#passwordless-authentication&#34;&gt;Passwordless authentication&lt;/a&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;host&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The host name of one of the nodes in the other database.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;port&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The port number of the other database.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;tls_configuration&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-tls-config/&#34;&gt;TLS Configuration&lt;/a&gt; to use for TLS. The TLS Configuration is ignored if &lt;code&gt;ImportExportTLSMode&lt;/code&gt; is set to any of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;REQUIRE_FORCE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VERIFY_CA_FORCE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VERIFY_FULL_FORCE&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The effective TLS mode of CONNECT TO VERTICA changes depending on the TLSMODE of the TLS Configuration and the value of &lt;a href=&#34;../../../en/sql-reference/config-parameters/security-parameters/#importexporttlsmode&#34;&gt;ImportExportTLSMode&lt;/a&gt; (for non-FORCE values). For details, see &lt;a href=&#34;#tlsmode&#34;&gt;Effective TLSMode&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If the target database is configured for &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/tls-overview/configuring-client-server-tls/&#34;&gt;mutual TLS&lt;/a&gt; and the user on the target database can &lt;a href=&#34;../../../en/security-and-authentication/client-authentication/tls-authentication/&#34;&gt;authenticate with TLS&lt;/a&gt;, you can use &lt;code&gt;tls_configuration&lt;/code&gt; to authenticate instead of &lt;em&gt;&lt;code&gt;password&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;TLSMODE PREFER&lt;/dt&gt;
&lt;dd&gt;
&lt;div class=&#34;admonition deprecated&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Deprecated&lt;/h4&gt;

This parameter has been superseded by the TLS CONFIGURATION parameter. TLSMODE PREFER only takes effect if TLS CONFIGURATION is not set.

&lt;/div&gt;
&lt;p&gt;Overrides the value of configuration parameter 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/config-parameters/security-parameters/#&#34;&gt;ImportExportTLSMode&lt;/a&gt;&lt;/code&gt; for this connection to &lt;code&gt;PREFER&lt;/code&gt;. If TLS CONFIGURATION is set or &lt;code&gt;ImportExportTLSMode&lt;/code&gt; is set to REQUIRE_FORCE, VERIFY_CA_FORCE, or VERIFY_FULL_FORCE, then TLSMODE PREFER has no effect.&lt;/p&gt;
&lt;p&gt;If TLSMODE PREFER and &lt;code&gt;ImportExportTLSMode&lt;/code&gt; are both not set, CONNECT TO VERTICA uses ENABLE.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;tlsmode&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;effective-tls-mode&#34;&gt;Effective TLS mode&lt;/h2&gt;
&lt;p&gt;The effective TLS mode of CONNECT TO VERTICA is determined by the TLSMODE of the TLS Configuration and the value of ImportExportTLSMode. The following table summarizes this interaction for non-FORCE values of ImportExportTLSMode:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
TLS Configuration&lt;/th&gt; 

&lt;th &gt;
ImportExportTLSMode&lt;/th&gt; 

&lt;th &gt;
Effective TLS mode&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
ENABLE&lt;/td&gt; 

&lt;td &gt;
PREFER&lt;/td&gt; 

&lt;td &gt;
PREFER&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
ENABLE&lt;/td&gt; 

&lt;td &gt;
Anything except PREFER&lt;/td&gt; 

&lt;td &gt;
REQUIRE&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
TRY_VERIFY, VERIFY_CA&lt;/td&gt; 

&lt;td &gt;
Anything&lt;/td&gt; 

&lt;td &gt;
VERIFY_CA&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VERIFY_FULL&lt;/td&gt; 

&lt;td &gt;
Anything&lt;/td&gt; 

&lt;td &gt;
VERIFY_FULL&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;security-requirements&#34;&gt;Security requirements&lt;/h2&gt;
&lt;p&gt;When importing from or exporting to a database, you can connect only to a database that uses trusted (username only) or password-based authentication, as described in &lt;a href=&#34;../../../en/security-and-authentication/#&#34;&gt;Security and authentication&lt;/a&gt;. OAuth and Kerberos authentication methods are not supported.&lt;/p&gt;

&lt;p&gt;If configured with a certificate, the database encrypts data during transmission using TLS and attempts to encrypt plan metadata. You can set configuration parameter 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/config-parameters/security-parameters/#&#34;&gt;ImportExportTLSMode&lt;/a&gt;&lt;/code&gt; to require encryption for plan metadata.&lt;/p&gt;
&lt;h2 id=&#34;passwordless-authentication&#34;&gt;Passwordless authentication&lt;/h2&gt;
&lt;p&gt;If you omit the &lt;em&gt;&lt;code&gt;password&lt;/code&gt;&lt;/em&gt; in the call to CONNECT TO VERTICA, you can authenticate to the target database in the following ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Credential forwarding&lt;/li&gt;
&lt;li&gt;TLS authentication&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For brevity, in this and later sections, &amp;quot;caller&amp;quot; refers to the user that runs CONNECT TO VERTICA from the source database to connect to the target database.&lt;/p&gt;
&lt;h3 id=&#34;credential-forwarding&#34;&gt;Credential forwarding&lt;/h3&gt;
&lt;p&gt;Credential forwarding lets you authenticate as the current user on the target database by forwarding your hash or password, depending on the caller&#39;s authentication method on the target database. To do this, the following requirements must be met:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The caller exists in both databases.&lt;/li&gt;
&lt;li&gt;In the target database, the caller has been &lt;a href=&#34;../../../en/sql-reference/statements/grant-statements/grant-authentication/&#34;&gt;granted&lt;/a&gt; a &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-authentication/&#34;&gt;&lt;code&gt;hash&lt;/code&gt; or &lt;code&gt;ldap&lt;/code&gt; authentication record&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For an example, see &lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#credential-forwarding-1&#34;&gt;Examples&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;tls-authentication&#34;&gt;TLS authentication&lt;/h3&gt;
&lt;p&gt;TLS authentication lets you use the certificates and keys in the specified &lt;code&gt;tls_configuration&lt;/code&gt; parameter to authenticate instead of a password. To do this, the following requirements must be met:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The caller exists in both databases.&lt;/li&gt;
&lt;li&gt;In the source database:
&lt;ul&gt;
&lt;li&gt;A custom &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/tls-overview/tls-configs/#&#34;&gt;TLS configurations&lt;/a&gt; contains a CA certificate, a client certificate, and client key that can be used to authenticate to the target database with TLS authentication.&lt;/li&gt;
&lt;li&gt;The caller has &lt;a href=&#34;../../../en/sql-reference/statements/grant-statements/grant-tls-config/&#34;&gt;USAGE privileges&lt;/a&gt; on the TLS Configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In the target database:
&lt;ul&gt;
&lt;li&gt;The caller has been &lt;a href=&#34;../../../en/sql-reference/statements/grant-statements/grant-authentication/&#34;&gt;granted&lt;/a&gt; a &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-authentication/&#34;&gt;TLS authentication record&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The caller can &lt;a href=&#34;../../../en/security-and-authentication/client-authentication/tls-authentication/client-authentication-with-tls/&#34;&gt;authenticate with TLS&lt;/a&gt; using the certificates of TLS Configuration from the source database. This requires a CA certificate that signs the client certificate from the source database.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For an example, see &lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#tls-authentication-1&#34;&gt;Examples&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;password-authentication&#34;&gt;Password authentication&lt;/h3&gt;
&lt;p&gt;The following example authenticates as the dbadmin to &lt;code&gt;ExampleDB&lt;/code&gt; on the host &lt;code&gt;VerticaHost01&lt;/code&gt; on port &lt;code&gt;5433&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CONNECT TO VERTICA ExampleDB USER dbadmin PASSWORD &amp;#39;Password123&amp;#39; ON &amp;#39;VerticaHost01&amp;#39;,5433;
CONNECT
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;credential-forwarding-1&#34;&gt;Credential forwarding&lt;/h3&gt;
&lt;p&gt;In the following example, Penny wants to run CONNECT TO VERTICA from &lt;code&gt;db_1&lt;/code&gt; to connect to &lt;code&gt;db_2&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

In general, the &lt;a href=&#34;../../../en/security-and-authentication/ldap-link-service/#&#34;&gt;LDAP link service&lt;/a&gt; should be used instead to synchronize users between databases. For demonstration purposes, the example below manually configures the user &lt;code&gt;penny&lt;/code&gt; on both databases. You can skip these steps if you use LDAP Link.

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_1&lt;/code&gt;, create the user &lt;code&gt;penny&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IDENTIFIED&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;my_password&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_2&lt;/code&gt;, create the user &lt;code&gt;penny&lt;/code&gt; with the same hash, salt, and &lt;a href=&#34;../../../en/security-and-authentication/client-authentication/hash-authentication/password-hashing-algorithm/&#34;&gt;security (hashing) algorithm&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On &lt;code&gt;db_1&lt;/code&gt;, retrieve the hash (from the &lt;code&gt;password&lt;/code&gt; column) and salt from &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/passwords/#&#34;&gt;PASSWORDS&lt;/a&gt;:
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;user_name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;password&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;salt&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;passwords&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WHERE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;user_name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;penny&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RECORD&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-------------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;user_name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;password&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sha512b2e0911954a79d9d419b7b42774d36d17dd8a663c966bf0dd8f4cd6aad00d3c7ee7ba74b9bf0e56071cd995ae04aeaae537b35903e97255ed5fe286b6ff0d00a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;salt&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;eac4ad840264e8c590120b31b815318f&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;On &lt;code&gt;db_1&lt;/code&gt;, retrieve the effective security algorithm from &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/password-auditor/#&#34;&gt;PASSWORD_AUDITOR&lt;/a&gt;:
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;user_name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;effective_security_algorithm&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;password_auditor&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WHERE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;user_name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;penny&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;user_name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;effective_security_algorithm&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-----------+------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SHA512&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;On &lt;code&gt;db_2&lt;/code&gt;, create the user &lt;code&gt;penny&lt;/code&gt;:
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;On &lt;code&gt;db_2&lt;/code&gt;, use &lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-user/#&#34;&gt;ALTER USER&lt;/a&gt; to set the security algorithm to the value in &lt;code&gt;db_1&lt;/code&gt;. For details, see &lt;a href=&#34;../../../en/security-and-authentication/client-authentication/hash-authentication/password-hashing-algorithm/#&#34;&gt;Password hashing algorithm&lt;/a&gt;:
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALTER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SECURITY_ALGORITHM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;SHA512&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;On &lt;code&gt;db_2&lt;/code&gt;, set &lt;code&gt;penny&lt;/code&gt;&#39;s password using the hash and salt from &lt;code&gt;db_1&lt;/code&gt;:
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALTER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IDENTIFIED&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;sha512b2e0911954a79d9d419b7b42774d36d17dd8a663c966bf0dd8f4cd6aad00d3c7ee7ba74b9bf0e56071cd995ae04aeaae537b35903e97255ed5fe286b6ff0d00a&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SALT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;eac4ad840264e8c590120b31b815318f&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_1&lt;/code&gt;, enable credential forwarding for &lt;code&gt;penny&lt;/code&gt; by setting &lt;a href=&#34;../../../en/sql-reference/config-parameters/security-parameters/#EnableConnectCredentialForwarding&#34;&gt;EnableConnectCredentialForwarding&lt;/a&gt; (disabled by default):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALTER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SET&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EnableConnectCredentialForwarding&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_2&lt;/code&gt;, &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-authentication/&#34;&gt;create&lt;/a&gt; an authentication record with the &lt;code&gt;hash&lt;/code&gt; method:

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;This example authentication record lets users authenticate to the database without TLS. In general, you should also &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/tls-overview/configuring-client-server-tls/&#34;&gt;configure client-server TLS&lt;/a&gt; and then specify
&lt;code&gt;HOST TLS&lt;/code&gt; so the hashed password is forwarded to the target database over a secure connection. For example:&lt;/p&gt;
&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE AUTHENTICATION v_hash_auth METHOD &#39;hash&#39; HOST TLS &#39;0.0.0.0/0&#39;;
&lt;/code&gt;
&lt;/pre&gt;


&lt;/div&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTHENTICATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;v_hash_auth&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;METHOD&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;hash&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;HOST&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;0.0.0.0/0&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Grant the authentication record to &lt;code&gt;penny&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;GRANT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTHENTICATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;v_hash_auth&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_1&lt;/code&gt;, run CONNECT TO VERTICA to connect to &lt;code&gt;db_2&lt;/code&gt;, omitting the password. This example uses the &lt;a href=&#34;../../../en/setup/set-up-on-premises/before-you-install/configure-network/ensure-ports-are-available/&#34;&gt;default port&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CONNECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VERTICA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;db_2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;example.com&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5433&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;tls-authentication-1&#34;&gt;TLS authentication&lt;/h3&gt;
&lt;p&gt;In the following example, Penny wants to run CONNECT TO VERTICA from &lt;code&gt;db_1&lt;/code&gt; to connect to &lt;code&gt;db_2&lt;/code&gt; without specifying her password:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create the user &lt;code&gt;penny&lt;/code&gt; on both databases.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IDENTIFIED&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;my_password&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_1&lt;/code&gt;, &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/tls-overview/generating-tls-certificates-and-keys/&#34;&gt;create or import&lt;/a&gt; a CA certificate, server certificate, and client certificate.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;-- Create a CA certificate
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;root_key&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TYPE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;RSA&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;LENGTH&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2048&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CERTIFICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_root_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SUBJECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/C=US/ST=Massachusetts/L=Burlington/O=OpenText/OU=Vertica/CN=Vertica Root CA&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALID&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FOR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3650&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXTENSIONS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;authorityKeyIdentifier&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;keyid:always,issuer&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;nsComment&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Vertica generated root CA cert&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_root_key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-- Create a client certificate, signing it with the CA certificate
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;client_key&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TYPE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;RSA&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;LENGTH&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2048&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CERTIFICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_client_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SUBJECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/C=US/ST=Massachusetts/L=Burlington/O=OpenText/OU=Vertica/CN=penny&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SIGNED&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_root_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXTENSIONS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;nsComment&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Vertica client cert&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;extendedKeyUsage&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;clientAuth&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_client_key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-- Create a server certificate, signing it with the CA certificate
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_server_key&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TYPE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;RSA&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;LENGTH&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2048&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CERTIFICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_server_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SUBJECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/C=US/ST=Massachusetts/L=Burlington/O=OpenText/OU=Vertica/CN=*.example.com&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SIGNED&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_root_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXTENSIONS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;extendedKeyUsage&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;serverAuth&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_server_key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_1&lt;/code&gt;, create a custom TLS configuration to use with CONNECT TO VERTICA, adding the &lt;code&gt;mtls_client_cert&lt;/code&gt; and &lt;code&gt;mtls_root_cert&lt;/code&gt; as the certificates and setting TLSMODE to &lt;code&gt;ENABLE&lt;/code&gt; or higher:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CONFIGURATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALTER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CONFIGURATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CERTIFICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_client_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ADD&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CERTIFICATES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_root_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLSMODE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;ENABLE&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_2&lt;/code&gt;, import the CA certificate, server certificate, and server key from &lt;code&gt;db_1&lt;/code&gt;. You can retrieve the contents of a certificate and key from the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/certificates/#&#34;&gt;CERTIFICATES&lt;/a&gt; and &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/cryptographic-keys/#&#34;&gt;CRYPTOGRAPHIC_KEYS&lt;/a&gt; system tables:


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE CA CERTIFICATE mtls_root_cert AS &#39;-----BEGIN CERTIFICATE-----&lt;span class=&#34;code-variable&#34;&gt;certificate_text&lt;/span&gt;-----END CERTIFICATE-----&#39;;
=&gt; CREATE CERTIFICATE mtls_server_key AS &#39;-----BEGIN PRIVATE KEY-----&lt;span class=&#34;code-variable&#34;&gt;key&lt;/span&gt;-----END PRIVATE KEY-----&#39;
=&gt; CREATE CERTIFICATE mtls_server_cert AS &#39;-----BEGIN CERTIFICATE-----&lt;span class=&#34;code-variable&#34;&gt;certificate_text&lt;/span&gt;-----END CERTIFICATE-----&#39;;
&lt;/code&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_2&lt;/code&gt;, configure &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/tls-overview/configuring-client-server-tls/&#34;&gt;mutual mode client-server TLS&lt;/a&gt; using &lt;code&gt;mtls_root_cert&lt;/code&gt; and &lt;code&gt;mtls_server_cert&lt;/code&gt; and setting the TLSMODE to &lt;code&gt;TRY_VERIFY&lt;/code&gt; or higher:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALTER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CONFIGURATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;server&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CERTIFICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_server_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ADD&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CERTIFICATES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_root_cert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLSMODE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;TRY_VERIFY&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_2&lt;/code&gt;, &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-authentication/&#34;&gt;create&lt;/a&gt; an authentication record for &lt;a href=&#34;../../../en/security-and-authentication/client-authentication/tls-authentication/#&#34;&gt;TLS authentication&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTHENTICATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_auth&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;METHOD&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;tls&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;HOST&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;0.0.0.0/0&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_2&lt;/code&gt;, &lt;a href=&#34;../../../en/sql-reference/statements/grant-statements/grant-authentication/&#34;&gt;grant&lt;/a&gt; &lt;code&gt;mtls_auth&lt;/code&gt; to &lt;code&gt;penny&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;GRANT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTHENTICATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls_auth&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;code&gt;db_1&lt;/code&gt;, run CONNECT TO VERTICA to connect to &lt;code&gt;db_2&lt;/code&gt;, specifying the &lt;code&gt;mtls&lt;/code&gt; TLS Configuration. This example uses the &lt;a href=&#34;../../../en/setup/set-up-on-premises/before-you-install/configure-network/ensure-ports-are-available/&#34;&gt;default port&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CONNECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VERTICA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;vmart&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;penny&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;example.com&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5433&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CONFIGURATION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mtls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: COPY</title>
      <link>/en/sql-reference/statements/copy/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/copy/</guid>
      <description>
        
        
        &lt;p&gt;COPY bulk-loads data into an OpenText™ Analytics Database. By default, COPY automatically commits itself and any current transaction except when loading temporary tables. If COPY is terminated or interrupted, the database rolls it back.&lt;/p&gt;
&lt;p&gt;COPY reads data as UTF-8 encoding.&lt;/p&gt;
&lt;p&gt;For information on loading one or more files or pipes on a cluster host or on a client system, see &lt;a href=&#34;../../../en/sql-reference/statements/copy-local/&#34;&gt;COPY LOCAL&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To define a data pipeline to automatically load new files, see &lt;a href=&#34;../../../en/data-load/automatic-load/#&#34;&gt;Automatic load&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;COPY [ /*+ LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ] [[{&lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt;. | &lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt;. }]&lt;span class=&#34;code-variable&#34;&gt;schema.&lt;/span&gt;]&lt;span class=&#34;code-variable&#34;&gt;target-table&lt;/span&gt;
   [ ( { &lt;span class=&#34;code-variable&#34;&gt;column-as-expression&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;column&lt;/span&gt; }
       [ DELIMITER [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; ]
       [ ENCLOSED [ BY ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; ]
       [ ENFORCELENGTH ]
       [ ESCAPE [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; | NO ESCAPE ]
       [ FILLER &lt;span class=&#34;code-variable&#34;&gt;datatype&lt;/span&gt;]
       [ FORMAT &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;format&lt;/span&gt;&amp;#39; ]
       [ NULL [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;string&lt;/span&gt;&amp;#39; ]
       [ TRIM &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;byte&lt;/span&gt;&amp;#39; ]
       [,...] ) ]
   [ COLUMN OPTION (&lt;span class=&#34;code-variable&#34;&gt;column&lt;/span&gt;
       [ DELIMITER [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; ]
       [ ENCLOSED [ BY ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; ]
       [ ENFORCELENGTH ]
       [ ESCAPE [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; | NO ESCAPE ]
       [ FORMAT &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;format&lt;/span&gt;&amp;#39; ]
       [ NULL [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;string&lt;/span&gt;&amp;#39; ]
       [ TRIM &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;byte&lt;/span&gt;&amp;#39; ]
     [,...] ) ]
FROM {
   [ LOCAL ] STDIN [ &lt;span class=&#34;code-variable&#34;&gt;compression&lt;/span&gt; ]
   | { &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;path-to-data&lt;/span&gt;&amp;#39;
       [ ON { &lt;span class=&#34;code-variable&#34;&gt;nodename&lt;/span&gt; | (&lt;span class=&#34;code-variable&#34;&gt;nodeset&lt;/span&gt;) | ANY NODE | EACH NODE } ] [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/copy/parameters/#compression&#34;&gt;compression&lt;/a&gt;&lt;/span&gt; ] }[,...]
     [ PARTITION COLUMNS &lt;span class=&#34;code-variable&#34;&gt;column&lt;/span&gt;[,...] ]
   | &lt;a href=&#34;../../../en/sql-reference/statements/copy-local/#&#34;&gt;LOCAL&lt;/a&gt; &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;&lt;span class=&#34;code-variable&#34;&gt;path-to-data&lt;/span&gt;&lt;/span&gt;&amp;#39; [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/copy/parameters/#compression&#34;&gt;compression&lt;/a&gt;&lt;/span&gt; ] [,...]
   | &lt;a href=&#34;../../../en/sql-reference/statements/copy-from/#&#34;&gt;VERTICA&lt;/a&gt; {&lt;span class=&#34;code-variable&#34;&gt;source-namespace&lt;/span&gt;. | &lt;span class=&#34;code-variable&#34;&gt;source-database&lt;/span&gt;. }[&lt;span class=&#34;code-variable&#34;&gt;source-schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;source-table&lt;/span&gt;[(&lt;span class=&#34;code-variable&#34;&gt; source-column&lt;/span&gt;[,...] ) ]
  }
  [ NATIVE
    | FIXEDWIDTH COLSIZES {( &lt;span class=&#34;code-variable&#34;&gt;integer&lt;/span&gt; )[,...]}
    | NATIVE VARCHAR
    | ORC
    | PARQUET
  ]
  | [ WITH ] &lt;span class=&#34;code-variable&#34;&gt;UDL-clause&lt;/span&gt;[...]
}
   [ ABORT ON ERROR ]
   [ DELIMITER [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; ]
   [ ENCLOSED [ BY ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39;
   [ ENFORCELENGTH ]
   [ ERROR TOLERANCE ]
   [ ESCAPE [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;char&lt;/span&gt;&amp;#39; | NO ESCAPE ]
   [ EXCEPTIONS &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;&amp;#39; [ ON &lt;span class=&#34;code-variable&#34;&gt;nodename&lt;/span&gt;] [,...]
   [ NULL [ AS ] &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;string&lt;/span&gt;&amp;#39; ]
   [ RECORD TERMINATOR &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;string&lt;/span&gt;&amp;#39; ]
   [ REJECTED DATA {&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;&amp;#39; [ ON &lt;span class=&#34;code-variable&#34;&gt;nodename&lt;/span&gt;]&lt;span class=&#34;code-input&#34;&gt; &lt;/span&gt;[,...] | AS TABLE &lt;span class=&#34;code-variable&#34;&gt;reject-table&lt;/span&gt;} ]
   [ REJECTMAX &lt;span class=&#34;code-variable&#34;&gt;integer&lt;/span&gt; ]
   [ SKIP &lt;span class=&#34;code-variable&#34;&gt;integer&lt;/span&gt; ]
   [ SKIP BYTES &lt;span class=&#34;code-variable&#34;&gt;integer&lt;/span&gt; ]
   [ STREAM NAME  &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;streamName&lt;/span&gt;&amp;#39;]
   [ TRAILING NULLCOLS ]
   [ TRIM &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;byte&lt;/span&gt;&amp;#39; ]
   [ [ WITH ] PARSER &lt;span class=&#34;code-variable&#34;&gt;parser &lt;/span&gt;([ &lt;span class=&#34;code-variable&#34;&gt;arg&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;value&lt;/span&gt;[,...] ]) ] ]
   [ NO COMMIT ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/sql-reference/statements/copy/parameters/#&#34;&gt;Parameters&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;restrictions&#34;&gt;Restrictions&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/sql-reference/statements/copy/restrictions/#&#34;&gt;Restrictions&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;&lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/db-superuser/&#34; title=&#34;&#34;&gt;Superusers&lt;/a&gt; have full COPY privileges. The following requirements apply to non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;INSERT privilege on table&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;USAGE privilege on schema&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;USER-accessible storage location&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Applicable READ or WRITE privileges granted to the storage location where files are read or written&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;COPY can specify a path to store rejected data and exceptions. If the path resolves to a storage location, the following privileges apply to non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The storage location was created with the USER option (see &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-location/#&#34;&gt;CREATE LOCATION&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The user must has READ access to the storage location, as described in &lt;a href=&#34;../../../en/sql-reference/statements/grant-statements/grant-storage-location/#&#34;&gt;GRANT (storage location)&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: COPY FROM VERTICA</title>
      <link>/en/sql-reference/statements/copy-from/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/copy-from/</guid>
      <description>
        
        
        &lt;p&gt;Imports data from another OpenText™ Analytics Database. &lt;span class=&#34;sql&#34;&gt;COPY FROM VERTICA&lt;/span&gt; is similar to &lt;span class=&#34;sql&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/copy/#&#34;&gt;COPY&lt;/a&gt;&lt;/span&gt;, but supports only a subset of its parameters.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
The source database must be no more than one major release behind the target database.
&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;COPY [[{&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt; }.]&lt;span class=&#34;code-variable&#34;&gt;target-schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;target-table&lt;/span&gt;
    [( &lt;span class=&#34;code-variable&#34;&gt;target-columns&lt;/span&gt; )]
    FROM VERTICA {&lt;span class=&#34;code-variable&#34;&gt;source-database&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;source-namespace&lt;/span&gt; }.[&lt;span class=&#34;code-variable&#34;&gt;source-schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;source-table&lt;/span&gt;
    [( &lt;span class=&#34;code-variable&#34;&gt;source-columns&lt;/span&gt; )]
    [STREAM NAME &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;stream name&lt;/span&gt;&amp;#39;]
    [NO COMMIT]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;{ &lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt; &lt;code&gt;|&lt;/code&gt; &lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the database or &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; that contains &lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Database name: If specified, it must be the current database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Namespace name (Eon Mode only): You must specify the namespace of objects in non-default namespaces. If no namespace is provided, it is assumed the object is in the default namespace.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the schema, by default &lt;code&gt;public&lt;/code&gt;. If you specify the namespace or database name, you must provide the schema name, even if the schema is &lt;code&gt;public&lt;/code&gt;.
&lt;p&gt;If you specify a schema name that contains a period, the part before the period cannot be the same as the name of an existing namespace.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The target table for the imported data. The database loads the data into all projections that include columns from the schema table.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of columns in &lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt; to store the copied data.See &lt;a href=&#34;#Mapping&#34;&gt;Mapping Between Target and Source Columns&lt;/a&gt; below.
&lt;p&gt;You cannot use FILLER columns or columns of &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/&#34;&gt;complex types&lt;/a&gt;, except native arrays, as part of the column definition.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;{ &lt;/code&gt;&lt;em&gt;&lt;code&gt;source-database&lt;/code&gt;&lt;/em&gt; &lt;code&gt;|&lt;/code&gt; &lt;em&gt;&lt;code&gt;source-namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The source of the data to import. Namespaces are available only in Eon Mode.
&lt;p&gt;A connection to the source database must already exist in the current session before starting the copy operation; otherwise the database returns an error. For details, see 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#&#34;&gt;CONNECT TO VERTICA&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;[&lt;/code&gt;&lt;em&gt;&lt;code&gt;source-schema&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;source-table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table that is the source of the imported data. If &lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt; is any schema other than &lt;code&gt;public&lt;/code&gt; or if you specified a &lt;em&gt;&lt;code&gt;source-namespace&lt;/code&gt;&lt;/em&gt;, you must supply the schema name.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;source-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of the columns in the source table to import. If omitted, all columns are exported.Columns cannot be of complex types. See &lt;a href=&#34;#Mapping&#34;&gt;Mapping Between Target and Source Columns&lt;/a&gt; below.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;STREAM NAME&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A &lt;span class=&#34;sql&#34;&gt;COPY&lt;/span&gt; load stream identifier. Using a stream name helps to quickly identify a particular load. The &lt;span class=&#34;sql&#34;&gt;STREAM NAME&lt;/span&gt; value that you specify in the load statement appears in the &lt;code&gt;stream&lt;/code&gt; column of the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/load-streams/&#34;&gt;&lt;code&gt;LOAD_STREAMS&lt;/code&gt;&lt;/a&gt; system table.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;NO COMMIT&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Prevents &lt;code&gt;COPY&lt;/code&gt; from committing its transaction automatically when it finishes copying data. For details, see &lt;a href=&#34;../../../en/data-load/using-transactions-to-stage-load/#&#34;&gt;Using transactions to stage a load&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Source table: SELECT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Target table: INSERT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Target table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Mapping&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;mapping-between-target-and-source-columns&#34;&gt;Mapping between target and source columns&lt;/h2&gt;
&lt;p&gt;If you copy all table data from one database to another, &lt;span class=&#34;sql&#34;&gt;COPY FROM VERTICA&lt;/span&gt; can omit specifying column lists if column definitions in both tables comply with the following conditions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Same number of columns&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Identical column names&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Same sequence of columns&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Matching or &lt;a href=&#34;../../../en/sql-reference/data-types/data-type-coercion-chart/&#34;&gt;compatible&lt;/a&gt; column data types&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No complex data types (ARRAY, SET, or ROW), except for native arrays&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If any of these conditions is not true, the &lt;span class=&#34;sql&#34;&gt;COPY FROM VERTICA&lt;/span&gt; statement must include column lists that explicitly map target and source columns to each other, as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Contain the same number of columns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;List source and target columns in the same order.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pair columns with the same (or &lt;a href=&#34;../../../en/sql-reference/data-types/data-type-coercion-chart/&#34;&gt;compatible&lt;/a&gt;) data types.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;node-failure-during-copy&#34;&gt;Node failure during COPY&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/data-export/db-export-and-import/handling-node-failure-during-copyexport/#&#34;&gt;Handling node failure during copy/export&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example copies the contents of an entire table from the &lt;code&gt;vmart&lt;/code&gt; database to an identically-defined table in the current database:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CONNECT TO VERTICA vmart USER dbadmin PASSWORD &amp;#39;myPassword&amp;#39; ON &amp;#39;VertTest01&amp;#39;,5433;
CONNECT
=&amp;gt; COPY customer_dimension FROM  VERTICA vmart.customer_dimension;
 Rows Loaded
-------------
      500000
(1 row)
=&amp;gt; DISCONNECT vmart;
DISCONNECT
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For more examples, see &lt;a href=&#34;../../../en/data-export/db-export-and-import/copying-data-from-another-db/#&#34;&gt;Copying data from another OpenText Analytics Database&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/export-to/#&#34;&gt;EXPORT TO VERTICA&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: COPY LOCAL</title>
      <link>/en/sql-reference/statements/copy-local/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/copy-local/</guid>
      <description>
        
        
        &lt;p&gt;Using the COPY statement with its LOCAL option lets you load data files (up to 4,294,967,295 files) on a client system, rather than on a cluster host. COPY LOCAL supports the STDIN and &lt;code&gt;&#39;pathToData&#39;&lt;/code&gt; parameters, but not the [ON &lt;em&gt;nodename&lt;/em&gt;] clause. COPY LOCAL does not support multiple file batches in NATIVE or NATIVE VARCHAR formats. COPY LOCAL does not support reading ORC or Parquet files; use ON NODE instead. COPY LOCAL does not support CURRENT_LOAD_SOURCE().&lt;/p&gt;
&lt;p&gt;The COPY LOCAL option is platform-independent. The statement works in the same way across all supported OpenText™ Analytics Database platforms and drivers. For more details about supported drivers, see &lt;a href=&#34;../../../en/connecting-to/client-libraries/client-drivers/#&#34;&gt;Client drivers&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;COPY LOCAL does not automatically create files detailing exceptions and rejections, even if exceptions occur.&lt;/p&gt;
&lt;p&gt;COPY LOCAL is subject to the following restrictions when used with vsql and the &lt;a href=&#34;../../../en/connecting-to/client-libraries/&#34;&gt;client libraries&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;COPY LOCAL must be the first statement in any multi-statement query.&lt;/li&gt;
&lt;li&gt;COPY LOCAL cannot be used multiple times in the same query.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

On Windows clients, the path you supply for the COPY LOCAL file is limited to 216 characters due to limitations in the Windows API.

&lt;/div&gt;

&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;User must have INSERT privilege on the table and USAGE privilege on the schema.&lt;/p&gt;
&lt;h2 id=&#34;how-copy-local-works&#34;&gt;How COPY LOCAL works&lt;/h2&gt;
&lt;p&gt;COPY LOCAL loads data in a platform-neutral way. The COPY LOCAL statement loads all files from a local client system to the database host, where the server processes the files. You can copy files in various formats: uncompressed, compressed, fixed-width format, in bzip or gzip format, or specified as a bash glob. Files of a single format (such as all bzip, or gzip) can be comma-separated in the list of input files. You can also use any of the applicable COPY statement options (as long as the data format supports the option). For instance, you can define a specific delimiter character, or how to handle NULLs, and so forth.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The Linux &lt;code&gt;glob&lt;/code&gt; command returns files that match the pattern you enter, as specified in the &lt;a href=&#34;http://linux.die.net/man/7/glob&#34;&gt;Linux Manual Page for Glob (7)&lt;/a&gt;. For ADO.net platforms, specify patterns and wildcards as described in the .NET &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/wz42302f.aspx&#34;&gt;Directory.getFiles Method&lt;/a&gt;.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;For more information about using the COPY LOCAL option to load data, see &lt;a href=&#34;../../../en/sql-reference/statements/copy/&#34;&gt;COPY&lt;/a&gt; for syntactical descriptions, and &lt;a href=&#34;../../../en/data-load/specifying-where-to-load-data-from/#&#34;&gt;Specifying where to load data from&lt;/a&gt; for detailed examples.&lt;/p&gt;
&lt;p&gt;The database host uncompresses and processes the files as necessary, regardless of file format or the client platform from which you load the files. Once the server has the copied files, the database maintains performance by distributing file parsing tasks, such as encoding, compressing, uncompressing, across nodes.&lt;/p&gt;
&lt;h2 id=&#34;viewing-copy-local-operations-in-a-query-plan&#34;&gt;Viewing copy local operations in a query plan&lt;/h2&gt;
&lt;p&gt;When you use the COPY LOCAL option, the GraphViz query plan includes a label for &lt;code&gt;Load-Client-File&lt;/code&gt;, rather than &lt;code&gt;Load-File&lt;/code&gt;. Following is a section from a sample query plan:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;-----------------------------------------------
  PLAN:  BASE BULKLOAD PLAN  (GraphViz Format)
-----------------------------------------------
 digraph G {
 graph [rankdir=BT, label = &amp;#34; BASE BULKLOAD PLAN \nAll Nodes Vector:
 \n\n  node[0]=initiator (initiator) Up\n&amp;#34;, labelloc=t, labeljust=l ordering=out]
.
.
.
10[label = &amp;#34;&lt;span class=&#34;code-input&#34;&gt;Load-Client-File(/tmp/diff)&lt;/span&gt; \nOutBlk=[UncTuple]&amp;#34;,
color = &amp;#34;green&amp;#34;, shape = &amp;#34;ellipse&amp;#34;];
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows a load from a local file.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat &amp;gt; t.dat
12
17
9
^C

=&amp;gt; CREATE TABLE numbers (value INT);
CREATE TABLE

=&amp;gt; COPY numbers FROM LOCAL &amp;#39;t.dat&amp;#39;;
 Rows Loaded
-------------
           3
(1 row)

=&amp;gt; SELECT * FROM numbers;
 value
-------
    12
    17
     9
(3 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: CREATE statements</title>
      <link>/en/sql-reference/statements/create-statements/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/create-statements/</guid>
      <description>
        
        
        &lt;p&gt;CREATE statements let you create new database objects such as tables and users.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DEACTIVATE DIRECTED QUERY</title>
      <link>/en/sql-reference/statements/deactivate-directed-query/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/deactivate-directed-query/</guid>
      <description>
        
        
        &lt;p&gt;Deactivates one or more directed queries previously activated by &lt;a href=&#34;../../../en/sql-reference/statements/activate-directed-query/#&#34;&gt;ACTIVATE DIRECTED QUERY&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DEACTIVATE DIRECTED QUERY { &lt;span class=&#34;code-variable&#34;&gt;query-name&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;input-query&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/where-clause/#&#34;&gt;where-clause&lt;/a&gt;&lt;/span&gt; }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;query-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the directed query to deactivate, as stored in the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/directed-queries/#&#34;&gt;DIRECTED_QUERIES&lt;/a&gt; column &lt;code&gt;query_name&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-query&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The input query of the directed queries to deactivate. Use this argument to deactivate multiple direct queries that map to the same input query.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;where-clause&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Resolves to one or more directed queries that are filtered from system table &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/directed-queries/#&#34;&gt;DIRECTED_QUERIES&lt;/a&gt;. For example, the following statement specifies to deactivate all directed queries with the same &lt;code&gt;save_plans_version&lt;/code&gt; identifier:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; DEACTIVATE DIRECTED QUERY WHERE save_plans_version = 21;
&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/db-superuser/&#34; title=&#34;&#34;&gt;Superuser&lt;/a&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/managing-queries/directed-queries/managing-directed-queries/#&#34;&gt;Managing directed queries&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DELETE</title>
      <link>/en/sql-reference/statements/delete/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/delete/</guid>
      <description>
        
        
        &lt;p&gt;Removes the specified rows from a table and returns a count of the deleted rows. A count of 0 is not an error, but indicates that no rows matched the condition. An unqualified &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; statement (one that omits a &lt;span class=&#34;sql&#34;&gt;WHERE&lt;/span&gt; clause) removes all rows but leaves intact table columns, projections, and constraints.&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; supports subqueries and joins, so you can delete values in a table based on values in other tables.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
OpenText™ Analytics Database implementation of DELETE differs from traditional databases; it does not delete data from disk storage, but instead marks rows as deleted so they are available for historical queries. Deleted data remains on disk and counts against disk quota, until purged.
&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DELETE [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ] 
  FROM [[{&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt; }.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;table&lt;/span&gt; [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/where-clause/#&#34;&gt;where-clause&lt;/a&gt;&lt;/span&gt; ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;{ &lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt; &lt;code&gt;|&lt;/code&gt; &lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the database or &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; that contains &lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Database name: If specified, it must be the current database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Namespace name (Eon Mode only): You must specify the namespace of objects in non-default namespaces. If no namespace is provided, it is assumed the object is in the default namespace.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the schema, by default &lt;code&gt;public&lt;/code&gt;. If you specify the namespace or database name, you must provide the schema name, even if the schema is &lt;code&gt;public&lt;/code&gt;.
&lt;p&gt;If you specify a schema name that contains a period, the part before the period cannot be the same as the name of an existing namespace.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Any table, including temporary tables.&lt;/dd&gt;
&lt;dt&gt;&lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/where-clause/&#34;&gt;where-clause&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;Which rows to mark for deletion. If you omit this clause, &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; behavior varies depending on whether the table is persistent or temporary. See below for details.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Table owner or user with GRANT OPTION is grantor.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;DELETE privilege on table&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;USAGE privilege on the schema of the target table&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SELECT privilege on a table when the &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; statement includes a &lt;span class=&#34;sql&#34;&gt;WHERE&lt;/span&gt; or &lt;span class=&#34;sql&#34;&gt;SET&lt;/span&gt; clause that specifies columns from that table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;restrictions&#34;&gt;Restrictions&lt;/h2&gt;
&lt;p&gt;You cannot execute &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; on an &lt;a href=&#34;../../../en/admin/working-with-native-tables/immutable-tables/&#34;&gt;immutable table&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;committing-successive-table-changes&#34;&gt;Committing successive table changes&lt;/h2&gt;
&lt;p&gt;OpenText™ Analytics Database follows the SQL-92 transaction model, so successive INSERT, UPDATE, and DELETE statements are included in the same transaction. You do not need to explicitly start this transaction; however, you must explicitly end it with &lt;a href=&#34;../../../en/sql-reference/statements/commit/#&#34;&gt;COMMIT&lt;/a&gt;, or implicitly end it with &lt;a href=&#34;../../../en/sql-reference/statements/copy/#&#34;&gt;COPY&lt;/a&gt;. Otherwise, the database discards all changes that were made within the transaction.&lt;/p&gt;

&lt;h2 id=&#34;persistent-and-temporary-tables&#34;&gt;Persistent and temporary tables&lt;/h2&gt;
&lt;p&gt;When deleting from a persistent table, &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; removes data directly from the ROS.&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; execution on temporary tables varies, depending on whether the table was created with &lt;span class=&#34;sql&#34;&gt;ON COMMIT DELETE ROWS&lt;/span&gt; (default) or &lt;span class=&#34;sql&#34;&gt;ON COMMIT PRESERVE ROWS&lt;/span&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; contains a &lt;span class=&#34;sql&#34;&gt;WHERE&lt;/span&gt; clause that specifies which rows to remove, behavior is identical: &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; marks the rows for deletion. In both cases, you cannot roll back to an earlier savepoint.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; omits a &lt;span class=&#34;sql&#34;&gt;WHERE&lt;/span&gt; clause and the table was created with &lt;span class=&#34;sql&#34;&gt;ON COMMIT PRESERVE ROWS&lt;/span&gt;, the database marks all table rows for deletion. If the table was created with &lt;span class=&#34;sql&#34;&gt;ON COMMIT DELETE ROWS&lt;/span&gt;, &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; behaves like &lt;span class=&#34;sql&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/truncate-table/#&#34;&gt;TRUNCATE TABLE&lt;/a&gt;&lt;/span&gt; and removes all rows from storage.&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

If you issue an unqualified &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; statement on a temporary table created with &lt;span class=&#34;sql&#34;&gt;ON COMMIT DELETE ROWS&lt;/span&gt;, the database removes all rows from storage but does not end the transaction.

&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following statement removes all rows from a temporary table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; DELETE FROM temp1;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following statement deletes all records from a schema-qualified table where a condition is satisfied:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; DELETE FROM retail.customer WHERE state IN (&amp;#39;MA&amp;#39;, &amp;#39;NH&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For examples that show how to nest a subquery within a &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; statement, see &lt;a href=&#34;../../../en/data-analysis/queries/subqueries/subqueries-update-and-delete-statements/&#34;&gt;Subqueries in UPDATE and DELETE&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/drop-statements/drop-table/#&#34;&gt;DROP TABLE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/truncate-table/#&#34;&gt;TRUNCATE TABLE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/working-with-native-tables/removing-table-data/#&#34;&gt;Removing table data&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/working-with-native-tables/removing-table-data/optimizing-delete-and-update/#&#34;&gt;Optimizing DELETE and UPDATE&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DISCONNECT</title>
      <link>/en/sql-reference/statements/disconnect/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/disconnect/</guid>
      <description>
        
        
        &lt;p&gt;Closes a connection to another OpenText™ Analytics Database that was opened in the same session with 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#&#34;&gt;CONNECT TO VERTICA&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

Closing your session also closes the database connection. However, it is a good practice to explicitly close the connection to the other database, both to free up resources and to prevent issues with other SQL scripts that might be running in your session. Always closing the connection prevents potential errors if you run a script in the same session that attempts to open a connection to the same database, since each session can only have one connection to a given database at a time.

&lt;/div&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DISCONNECT &lt;span class=&#34;code-variable&#34;&gt;db-spec&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;db-spec&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the target database, either the database name or &lt;code&gt;DEFAULT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; DISCONNECT DEFAULT;
DISCONNECT
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DO</title>
      <link>/en/sql-reference/statements/do/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/do/</guid>
      <description>
        
        
        &lt;p&gt;Executes an anonymous (unnamed) &lt;a href=&#34;../../../en/extending/stored-procedures/&#34;&gt;stored procedure&lt;/a&gt; without saving it.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DO [ LANGUAGE &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;language-name&lt;/span&gt;&amp;#39; ] $$
    &lt;span class=&#34;code-variable&#34;&gt;source&lt;/span&gt;
$$;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;language-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the language of the procedure &lt;em&gt;&lt;code&gt;source&lt;/code&gt;&lt;/em&gt;, one of the following (both options refer to &lt;a href=&#34;../../../en/extending/stored-procedures/plvsql/&#34;&gt;PLvSQL&lt;/a&gt;; PLpgSQL is included to maintain compatibility with existing scripts):
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;PLvSQL&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;PLpgSQL&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;PLvSQL&lt;/code&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;source&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The source code of the procedure.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;For more complex examples, see &lt;a href=&#34;../../../en/extending/stored-procedures/stored-procedures-use-cases-and-examples/#&#34;&gt;Stored procedures: use cases and examples&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This procedure prints the variables in the DECLARE block:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DO LANGUAGE PLvSQL $$
DECLARE
    x int := 3;
    y varchar := &amp;#39;some string&amp;#39;;
BEGIN
    RAISE NOTICE &amp;#39;x = %&amp;#39;, x;
    RAISE NOTICE &amp;#39;y = %&amp;#39;, y;
END;
$$;

NOTICE 2005:  x = 3
NOTICE 2005:  y = some string
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For more information on RAISE NOTICE, see &lt;a href=&#34;../../../en/extending/stored-procedures/plvsql/errors-and-diagnostics/#&#34;&gt;Errors and diagnostics&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/extending/stored-procedures/#&#34;&gt;Stored procedures&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/extending/stored-procedures/plvsql/#&#34;&gt;PL/vSQL&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-procedure-stored/#&#34;&gt;CREATE PROCEDURE (stored)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DROP statements</title>
      <link>/en/sql-reference/statements/drop-statements/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/drop-statements/</guid>
      <description>
        
        
        &lt;p&gt;DROP statements let you delete database objects such as schemas, tables, and users.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: END</title>
      <link>/en/sql-reference/statements/end/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/end/</guid>
      <description>
        
        
        &lt;p&gt;Ends the current transaction and makes all changes that occurred during the transaction permanent and visible to other users.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;a href=&#34;../../../en/sql-reference/statements/commit/#&#34;&gt;COMMIT&lt;/a&gt; is a synonym for END.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;END [ WORK | TRANSACTION ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;WORK | TRANSACTION&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Optional keywords that have no effect, for readability only.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED READ WRITE;
BEGIN
=&amp;gt; CREATE TABLE sample_table (a INT);
CREATE TABLE
=&amp;gt; INSERT INTO sample_table (a) VALUES (1);
OUTPUT
--------
1
(1 row)

=&amp;gt; END;
COMMIT
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/transactions/#&#34;&gt;Transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/connecting-to/client-libraries/accessing/c/querying-db-using-ado-net/inserting-data-ado-net/creating-and-rolling-back-transactions/#&#34;&gt;Creating and rolling back transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/begin/#&#34;&gt;BEGIN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/rollback/#&#34;&gt;ROLLBACK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/start-transaction/#&#34;&gt;START TRANSACTION&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXECUTE DATA LOADER</title>
      <link>/en/sql-reference/statements/execute-data-loader/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/execute-data-loader/</guid>
      <description>
        
        
        &lt;p&gt;EXECUTE DATA LOADER executes a data loader created with &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-data-loader/#&#34;&gt;CREATE DATA LOADER&lt;/a&gt;.  It attempts to load all files in the specifed location that have not already been loaded and that have not reached the retry limit. By default, executing the loader commits the transaction.&lt;/p&gt;
&lt;p&gt;Data loaders are excuted with COPY ABORT ON ERROR.&lt;/p&gt;
&lt;p&gt;EXECUTE DATA LOADER records events in the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/data-loader-events/#&#34;&gt;DATA_LOADER_EVENTS&lt;/a&gt; system table.&lt;/p&gt;
&lt;p&gt;EXECUTE DATA LOADER runs the data loader once. To execute it periodically, you can use a &lt;a href=&#34;../../../en/extending/stored-procedures/executing-stored-procedures/triggers/scheduled-execution/&#34;&gt;scheduled stored procedure&lt;/a&gt;. To suspend execution, call &lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-data-loader/#&#34;&gt;ALTER DATA LOADER&lt;/a&gt; with the &lt;code&gt;DISABLE&lt;/code&gt; option.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXECUTE DATA LOADER [&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;name&lt;/span&gt;
   [ WITH FILES { file [ON { nodename | (nodeset) | ANY NODE | EACH NODE }] [compression] [{ EXACT_PATH | EXPAND_GLOB }] }[,...] ]
   [ FORCE RETRY ]
   [ BATCH_SIZE { &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;size&lt;/span&gt;{K|M|G|T}&amp;#39; | &amp;#39;0&amp;#39; | &amp;#39;UNLIMITED&amp;#39; } ]
   [ NO COMMIT ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Schema containing the data loader. The default schema is &lt;code&gt;public&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the data loader.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;WITH FILES&lt;/code&gt; &lt;em&gt;&lt;code&gt;file&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Load only the specified files from the data loader&#39;s COPY path. Files that do not also match the COPY path are ignored. Files that have already been loaded are not reloaded. Both of these events are recorded in the loader&#39;s associated monitoring table.&lt;/dd&gt;
&lt;/dl&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;If a file includes node assignments or compression settings, these will override the corresponding settings in the original &lt;code&gt;COPY&lt;/code&gt; statement for the specified file.&lt;/li&gt;
&lt;li&gt;If a file does not include node assignments or compression settings, they will be inherited from the original &lt;code&gt;COPY&lt;/code&gt; statement for the specified file.&lt;/li&gt;
&lt;li&gt;If a file uses &lt;code&gt;EXPAND_GLOB&lt;/code&gt;, the settings will not be inherited and you must explicitly specify them after the file if required.&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;p&gt;For more information about COPY parameters (node assignment and compression), see &lt;a href=&#34;../../../en/sql-reference/statements/copy/parameters/&#34;&gt;Parameters&lt;/a&gt;.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;EXACT_PATH | EXPAND_GLOB&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;How to match the named file:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;EXACT_PATH&lt;/code&gt; (default): file names must match exactly. Any special characters in the file name are treated as literal parts of the name. For example, &lt;code&gt;sales*.parquet&lt;/code&gt; specifies a single file whose name includes the &lt;code&gt;*&lt;/code&gt; character.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;EXPAND_GLOB&lt;/code&gt;: glob characters in file names are interpreted as globs. For example, &lt;code&gt;sales*.parquet&lt;/code&gt; specifies one or more Parquet files begainning with &lt;code&gt;sales&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;FORCE RETRY&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Ignore the retry limit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BATCH_SIZE {&lt;/code&gt; &#39;&lt;em&gt;&lt;code&gt;size&lt;/code&gt;&lt;/em&gt;&lt;code&gt;{K|M|G|T}&#39; | &#39;0&#39; | &#39;UNLIMITED&#39; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;When dividing a load for parallel execution, override the OpenText™ Analytics Database default and set the target total size of files to include in one batch. This value is a hint and batches could be larger, depending on the sizes of individual files.
&lt;p&gt;If this option is omitted, the database chooses a size based on the total data volume and the number of executor nodes. The maximum batch size that the database automatically chooses is 10GB on each node, but you can specify a larger value with this option.&lt;/p&gt;
&lt;p&gt;To set a target size, specify an integer with a unit of measure, such as &lt;code&gt;&#39;100M&#39;&lt;/code&gt; or &lt;code&gt;&#39;2G&#39;&lt;/code&gt;. To disable batch loads and load files one at a time, specify &#39;0&#39;. To load all files in a single batch, specify &#39;UNLIMITED&#39;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;NO COMMIT&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Do not commit the transaction after execution. Use when execution is part of an operation that must be atomic. SQS triggers use this option so that execution and queue management are part of the same transaction.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Read privileges to the source location.&lt;/p&gt;
&lt;p&gt;Non-superuser:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Owner or EXECUTE privilege on the data loader.&lt;/li&gt;
&lt;li&gt;Write privilege on the table.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Execute a data loader once:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;EXECUTE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DATA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LOADER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales_dl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loaded&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;           &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Schedule a recurring execution:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SCHEDULE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;daily_load&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CRON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;0 13 * * *&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--- statement must be quoted:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;PROCEDURE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dl_runner&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;$$&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;begin&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;EXECUTE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;EXECUTE DATA LOADER sales_dl&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;$$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TRIGGER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t_load&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SCHEDULE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;daily_load&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;EXECUTE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;PROCEDURE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dl_runner&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DEFINER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Load specific files with globbing:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;--- no file named &amp;#39;09*.dat&amp;#39; so nothing loaded by default:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;EXECUTE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DATA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LOADER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales_dl&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WITH&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FILES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s3://MyBucket/sales/2023/09*.dat&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loaded&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;           &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--- loads &amp;#39;09-01.dat&amp;#39;, &amp;#39;09-02.dat&amp;#39;, etc:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;EXECUTE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DATA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LOADER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales_dl&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WITH&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FILES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s3://MyBucket/sales/2023/09*.dat&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPAND_GLOB&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loaded&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--- loads one glob and one specific file:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;EXECUTE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DATA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LOADER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales_dl&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WITH&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FILES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s3://MyBucket/sales/2023/09*.dat&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPAND_GLOB&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;              &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s3://MyBucket/sales/2023/specials.dat&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXACT_PATH&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loaded&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;See &lt;a href=&#34;../../../en/data-load/automatic-load/#&#34;&gt;Automatic load&lt;/a&gt; for an extended example.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-data-loader/#&#34;&gt;CREATE DATA LOADER&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-data-loader/#&#34;&gt;ALTER DATA LOADER&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/drop-statements/drop-data-loader/#&#34;&gt;DROP DATA LOADER&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXPLAIN</title>
      <link>/en/sql-reference/statements/explain/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/explain/</guid>
      <description>
        
        
        &lt;p&gt;Returns a formatted description of the OpenText™ Analytics Database optimizer&#39;s plan for executing the specified statement.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPLAIN [/*+ &lt;a href=&#34;../../../en/sql-reference/language-elements/hints/allnodes/#&#34;&gt;ALLNODES&lt;/a&gt; */] [&lt;span class=&#34;code-variable&#34;&gt;explain-options&lt;/span&gt;] &lt;span class=&#34;code-variable&#34;&gt;sql-statement&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;/*+&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/allnodes/#&#34;&gt;ALLNODES&lt;/a&gt;*/&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies to create a query plan that assumes all nodes are active, not valid with &lt;code&gt;LOCAL&lt;/code&gt; option.&lt;/dd&gt;
&lt;dt&gt;&lt;a name=&#34;explain-options&#34;&gt;&lt;/a&gt;&lt;em&gt;&lt;code&gt;explain-options&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;One or more &lt;code&gt;EXPLAIN&lt;/code&gt; options, specified in the order shown:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[ LOCAL ] [ VERBOSE ] [ JSON ] [ ANNOTATED ]
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;LOCAL&lt;/code&gt;: On a multi-node database, shows the local query plans assigned to each node, which together comprise the total (global) query plan. If you omit this option, the database shows only the global query plan. Local query plans are shown only in DOT language source, which can be rendered in &lt;a href=&#34;http://graphviz.org/&#34;&gt;Graphviz&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This option is incompatible with the hint &lt;code&gt;/*+ALLNODES*/&lt;/code&gt;. If you specify both, EXPLAIN returns with an error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;VERBOSE&lt;/code&gt;: Increases the level of detail in the rendered query plan.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;JSON&lt;/code&gt;: Renders the query plan in JSON format. This option is compatible only with &lt;code&gt;VERBOSE&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ANNOTATED&lt;/code&gt;: Embeds &lt;a href=&#34;../../../en/sql-reference/language-elements/hints/&#34;&gt;optimizer hints&lt;/a&gt; that encapsulate the query plan for this query. This option is compatible with &lt;code&gt;LOCAL&lt;/code&gt; and &lt;code&gt;VERBOSE&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;sql-statement&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A query or DML statement—for example, &lt;a href=&#34;../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt;, &lt;a href=&#34;../../../en/sql-reference/statements/insert/#&#34;&gt;INSERT&lt;/a&gt;, &lt;a href=&#34;../../../en/sql-reference/statements/update/#&#34;&gt;UPDATE&lt;/a&gt;, &lt;a href=&#34;../../../en/sql-reference/statements/copy/#&#34;&gt;COPY&lt;/a&gt;, and &lt;a href=&#34;../../../en/sql-reference/statements/merge/#&#34;&gt;MERGE&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;The same privileges required by the specified statement.&lt;/p&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;p&gt;The following requirements apply to EXPLAIN&#39;s ability to produce useful information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reasonably representative statistics of your data must be available. See &lt;a href=&#34;../../../en/admin/collecting-db-statistics/&#34;&gt;Collecting Statistics&lt;/a&gt; for details.&lt;/li&gt;
&lt;li&gt;EXPLAIN produces useful output only if projections are available for the queried tables.&lt;/li&gt;
&lt;li&gt;Qualifier options must be specified in the order shown &lt;a href=&#34;#explain-options&#34;&gt;earlier&lt;/a&gt;, otherwise EXPLAIN returns with an error. If an option is incompatible with any preceding options, EXPLAIN ignores them.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/managing-queries/query-plans/viewing-query-plans/#&#34;&gt;Viewing query plans&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXPORT TO DELIMITED</title>
      <link>/en/sql-reference/statements/export-to-delimited/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/export-to-delimited/</guid>
      <description>
        
        
        &lt;p&gt;Exports a table, columns from a table, or query results to delimited files. The files can be read back in using &lt;a href=&#34;../../../en/sql-reference/statements/copy/parsers/delimited/#&#34;&gt;DELIMITED&lt;/a&gt;. Several exporter parameters have corresponding parser parameters, allowing you to change delimiters, null indicators, and other formatting.&lt;/p&gt;
&lt;p&gt;There are some limitations on the queries you can use in an export statement. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can export ROS‑format data and data from external tables in the OpenText™ Analytics Database, and you can also export data to Iceberg tables. The supported catalog types are &lt;code&gt;filesystem&lt;/code&gt;, &lt;code&gt;glue&lt;/code&gt;, and &lt;code&gt;hms&lt;/code&gt;. For more information, see &lt;a href=&#34;../../../en/sql-reference/statements/export-to-iceberg/#&#34;&gt;EXPORT TO ICEBERG&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;File exporters are UDxs that cannot be run in fenced mode. If the ForceUDxFencedMode configuration parameter is set to true to support other UDxs, you can set it to false at the session level before performing the export.&lt;/p&gt;
&lt;p&gt;This statement returns the number of rows written and logs information about exported files in a system table. See &lt;a href=&#34;../../../en/data-export/file-export/monitoring-exports/#&#34;&gt;Monitoring exports&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During an export to HDFS or an NFS mount point, the database writes files to a temporary directory in the same location as the destination and renames the directory when the export is complete. Do not attempt to use the files in the temporary directory. During an export to S3, GCS, or Azure, the database writes files directly to the destination path, so you must wait for the export to finish before reading the files. For more information, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPORT [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ] TO DELIMITED 
   ( directory=&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;&amp;#39;[, &lt;span class=&#34;code-variable&#34;&gt;param=value&lt;/span&gt;[,...] ] )
   [ OVER (&lt;span class=&#34;code-variable&#34;&gt;over-clause&lt;/span&gt; ) ] AS SELECT &lt;span class=&#34;code-variable&#34;&gt;query-expression&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;over-clause&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to partition table data using PARTITION BY. Within partitions you can sort using ORDER BY. See &lt;a href=&#34;../../../en/data-analysis/sql-analytics/#&#34;&gt;SQL analytics&lt;/a&gt;. This clause may contain column references but not expressions.
&lt;p&gt;If you partition data, the database creates a partition directory structure, transforming column names to lowercase. See &lt;a href=&#34;../../../en/data-load/partitioned-file-paths/#&#34;&gt;Partitioned data&lt;/a&gt; for a description of the directory structure. If you use the &lt;code&gt;fileName&lt;/code&gt; parameter, you cannot use partitioning.&lt;/p&gt;
&lt;p&gt;If you omit this clause, the database optimizes for maximum parallelism.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;query-expression&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the data to export. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt; for important limitations.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;directory&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The destination directory for the output files. The current user must have permission to write it. The destination can be on any of the following file systems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/hdfs-file-system/#&#34;&gt;HDFS file system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/s3-object-store/#&#34;&gt;S3 object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/google-cloud-storage-gcs-object-store/#&#34;&gt;Google Cloud Storage (GCS) object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/azure-blob-storage-object-store/#&#34;&gt;Azure Blob Storage object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Linux file system, either an NFS mount or local storage on each node&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See also: &lt;code&gt;ifDirExists&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ifDirExists&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;What to do if &lt;code&gt;directory&lt;/code&gt; already exists, one of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;fail&lt;/code&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;overwrite&lt;/code&gt;: replace the entire directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;append&lt;/code&gt;: export new files into the existing directory with a prepended hash that identifies all files in the exported batch&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;appendNoHash&lt;/code&gt;: export new files into the existing directory without a prepended hash; with this option, the database cannot clean up partial exports&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you specify &lt;code&gt;overwrite&lt;/code&gt; for an export to an object store, the existing directory is deleted recursively at the beginning of the operation and is not restored if the operation fails. Be careful not to export to a directory containing data you want to keep. For an export to a Linux file system or HDFS, the directory is only overwritten if the export succeeds.&lt;/p&gt;
&lt;p&gt;Do not do concurrent exports to the same directory. In particular, if you do so with a value of &lt;code&gt;overwrite&lt;/code&gt;, all operations appear to succeed, but the results are incorrect.&lt;/p&gt;
&lt;p&gt;When using &lt;code&gt;append&lt;/code&gt;, be careful to use the same table schema. Otherwise, queries of external tables using this data path could fail.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;If specified, all output is written to a single file of this name in the location specified by &lt;code&gt;directory&lt;/code&gt;. While the query can be processed by multiple nodes, only a single node generates the output data. The &lt;code&gt;fileSizeMB&lt;/code&gt; parameter is ignored, and the query cannot use partitioning in the OVER() clause.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filePrefix&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Prefix to use for exported files instead of the default hash. If used with &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;, choose a unique prefix to avoid overwriting existing files.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;addHeader&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;If true, add a header row to the beginning of each file.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; false&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;delimiter&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Column delimiter character. To produce CSV in accordance with RFC 4180, set the delimiter character to &lt;code&gt;,&lt;/code&gt; (comma).
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;|&lt;/code&gt; (vertical bar)&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;escapeDelimitersInsideEnclosures&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;If true, delimiter characters are escaped within values that are enclosed by &lt;code&gt;enclosedBy&lt;/code&gt;. This parameter is most relevant when &lt;code&gt;enclosedBy&lt;/code&gt; and &lt;code&gt;escapeAs&lt;/code&gt; have the same value. A value of false only applies when &lt;code&gt;enclosedBy&lt;/code&gt; has a value (is not an empty string).
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; true&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;recordTerminator&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Character that marks the record end.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;\n&lt;/code&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;enclosedBy&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Character to use to enclose string and date/time data. If you omit this parameter, no character encloses these data types.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;&#39;&#39;&lt;/code&gt; (empty string, no enclosing character)&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;escapeAs&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Character to use to escape values in exported data that must be escaped, including the &lt;code&gt;enclosedBy&lt;/code&gt; value.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;\&lt;/code&gt; (backslash)&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nullAs&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;String to represent null values in the data. If this parameter is included, the exporter exports all null values as this value. Otherwise, the exporter exports null values as zero-length strings.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;binaryTypesFormat&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Format for exported &lt;a href=&#34;../../../en/sql-reference/data-types/binary-data-types-binary-and-varbinary/&#34;&gt;binary data type&lt;/a&gt; (BINARY, VARBINARY, and LONG VARBINARY) values, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Default&lt;/code&gt;: Printable ASCII characters where possible and escaped octal representations of the non-printable bytes. The DELIMITED parser reads this format.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Hex&lt;/code&gt;: Base 16 (hexadecimal) representation; value is preceded by &#39;0x&#39; and bytes are not escaped.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Octal&lt;/code&gt;: Base 8 (octal) representation, without escaping.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Bitstring&lt;/code&gt;: Binary representation, without escaping.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, the value &lt;code&gt;a\000b\001c&lt;/code&gt; can be exported as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Default (assuming an escape character of &lt;code&gt;\&lt;/code&gt;): &lt;code&gt;a\\000b\\001c&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hex: &lt;code&gt;0x6100620163&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Octal: &lt;code&gt;141000142001143&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bitstring: &lt;code&gt;0110000100000000011000100000000101100011&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;compression&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Compression type, one of:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Uncompressed&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;BZip&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;GZip&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; Uncompressed&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileExtension&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Output file extension. If using compression, a compression-specific extension such as &lt;code&gt;.bz2&lt;/code&gt; is appended.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;csv&lt;/code&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileSizeMB&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The maximum file size of a single output file. This value is a hint, not a hard limit. A value of 0 specifies no limit. If &lt;code&gt;filename&lt;/code&gt; is also specified, &lt;code&gt;fileSizeMB&lt;/code&gt; is ignored.&lt;/p&gt;
&lt;p&gt;This value affects the size of individual output files, not the total output size. For smaller values, the database divides the output into more files; all data is still exported.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10GB&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported files. You can specify the value in Unix octal format (such as &lt;code&gt;665&lt;/code&gt;) or &lt;em&gt;&lt;code&gt;user&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;group&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;other&lt;/code&gt;&lt;/em&gt; format—for example, &lt;code&gt;rwxr-xr-x&lt;/code&gt;. The value must be formatted as a string even if using the octal format.&lt;/p&gt;
&lt;p&gt;Valid octal values range between &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1777&lt;/code&gt;, inclusive. See &lt;a href=&#34;https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html&#34;&gt;HDFS Permissions&lt;/a&gt; in the Apache Hadoop documentation.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 660, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;dirMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported directories. Values follow the same rules as those for &lt;em&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/em&gt;. Further, you must give the HDFS user full permission, at least &lt;code&gt;rwx------&lt;/code&gt; or &lt;code&gt;700&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 755, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Source table: SELECT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Destination directory: Write&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a name=&#34;Query&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;query-restrictions&#34;&gt;Query restrictions&lt;/h2&gt;
&lt;p&gt;You must provide an alias column label for selected column targets that are expressions.&lt;/p&gt;
&lt;p&gt;If you partition the output, you cannot specify schema and table names in the SELECT statement. Specify only the column name.&lt;/p&gt;
&lt;p&gt;The query can contain only a single outer SELECT statement. For example, you cannot use UNION:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DELIMITED&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ERROR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8975&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Only&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;single&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;statement&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;is&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;supported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HINT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Please&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;use&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;subquery&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;multiple&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;statements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Instead, rewrite the query to use a subquery:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DELIMITED&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Exported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;             &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To use composite statements such as UNION, INTERSECT, and EXCEPT, rewrite them as subqueries.&lt;/p&gt;
&lt;h2 id=&#34;data-types&#34;&gt;Data types&lt;/h2&gt;
&lt;p&gt;EXPORT TO DELIMITED does not support ARRAY, ROW, and SET types.&lt;/p&gt;
&lt;p&gt;This operation exports raw Flex columns as binary data.&lt;/p&gt;
&lt;h2 id=&#34;output&#34;&gt;Output&lt;/h2&gt;
&lt;p&gt;The export operation always creates (or appends to) an output directory, even if all output is written to a single file or the query produces zero rows.&lt;/p&gt;
&lt;p&gt;By default, output file names follow the pattern: &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;nodename&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;threadId&lt;/code&gt;&lt;/em&gt;&lt;code&gt;[-&lt;/code&gt;&lt;em&gt;&lt;code&gt;sequenceNumber&lt;/code&gt;&lt;/em&gt;&lt;code&gt;].&lt;/code&gt;&lt;em&gt;&lt;code&gt;extension&lt;/code&gt;&lt;/em&gt;. &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt; is typically an 8-character hash, but can be longer if the export appended to an existing directory. A sequence number is added if an export needs to be broken into pieces to satisfy &lt;code&gt;fileSizeMB&lt;/code&gt;. You can change the prefix using the &lt;code&gt;filePrefix&lt;/code&gt; parameter or, for appends, by setting &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;. You can write all output to a single named file using the &lt;code&gt;filename&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;Column names in partition directories are lowercase.&lt;/p&gt;
&lt;p&gt;Files exported to a local file system by any OpenText™ Analytics Database user are owned by the database superuser. Files exported to HDFS or object stores are owned by the database user who exported the data.&lt;/p&gt;
&lt;p&gt;Making concurrent exports to the same output destination is an error and can produce incorrect results.&lt;/p&gt;
&lt;p&gt;Exports to the local file system can be to an NFS mount (shared) or to the Linux file system on each node (non-shared). For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-linux-file-system/#&#34;&gt;Exporting to the Linux file system&lt;/a&gt;. Exports to non-shared local file systems have the following restrictions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The output directory must not exist on any node.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You must have a USER storage location or superuser privileges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot override the permissions mode of 700 for directories and 600 for files.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Exports to object-store file systems are not atomic. Be careful to wait for the export to finish before using the data. For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example exports uncompressed comma-separated values (CSV) with a header row in each file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DELIMITED&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;webhdfs:///user1/data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;delimiter&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;,&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;addHeader&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;true&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXPORT TO ICEBERG</title>
      <link>/en/sql-reference/statements/export-to-iceberg/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/export-to-iceberg/</guid>
      <description>
        
        
        &lt;p&gt;Exports data from OpenText™ Analytics Database tables into Apache Iceberg format, an open table format for large-scale analytics with ACID transaction support. Iceberg tables store data in Parquet format, a columnar storage format optimized for such workloads. This integration allows database users to use data lake architectures and interoperate with query engines such as Apache Spark, Trino, and Flink.&lt;/p&gt;
&lt;h2 id=&#34;benefits&#34;&gt;Benefits&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Interoperability: Share data across multiple query engines.&lt;/li&gt;
&lt;li&gt;Open format: Avoid vendor lock-in by using Iceberg’s open standard.&lt;/li&gt;
&lt;li&gt;Flexible storage: Supports cloud storage (AWS S3, Azure Blob, GCS) and on-premises storage (HDFS, NFS, S3-compatible, local storage).&lt;/li&gt;
&lt;li&gt;Scalability: Manage large datasets efficiently with Iceberg’s metadata layer.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;use-cases&#34;&gt;Use cases&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Moving cold data from OpenText™ Analytics Database to a lower-cost data lake architecture.&lt;/li&gt;
&lt;li&gt;Sharing database data with Spark or Trino to accomodate for existing data pipelines.&lt;/li&gt;
&lt;li&gt;Building a multi-engine query environment using Iceberg tables.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;OpenText™ Analytics Database 25.4 or later.&lt;/li&gt;
&lt;li&gt;Permissions on the target storage location.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;p&gt;Exporting to Iceberg is currently performed using the EXPORT TO PARQUET command along with the &lt;code&gt;icebergCatalog&lt;/code&gt; parameter. For more information about the syntax, see &lt;a href=&#34;../../../en/sql-reference/statements/export-to-parquet/#&#34;&gt;EXPORT TO PARQUET&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Filesystem catalog&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Export data from a table named &lt;code&gt;large_t&lt;/code&gt;  to an Iceberg table on the file system, using &lt;code&gt;/mnt/shared_nfs/accounts&lt;/code&gt; as the directory for the Iceberg table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;icebergCatalog&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;filesystem&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;large_t&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;AWS Glue catalog&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Export data from a table named &lt;code&gt;sales_orders&lt;/code&gt;  to an Iceberg table on AWS Glue, using &lt;code&gt;s3://data-lake/iceberg/customer_orders&lt;/code&gt; as the directory for the Iceberg table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;icebergCatalog&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;glue&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;glueDB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;analytics&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;glueTable&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;customer_orders&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s3://data-lake/iceberg/customer_orders&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales_orders&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Hive Metastore catalog&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Export data from a table named &lt;code&gt;users_connection&lt;/code&gt; to an HDFS location &lt;code&gt;webhdfs://hive-metastore-host:9870/iceberg/users&lt;/code&gt; managed under the Hive Metastore Iceberg catalog.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;icebergCatalog&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;hms&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsDB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;testdb&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsTable&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;users&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsUri&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;thrift://hive-metastore-host:9083&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;webhdfs://hive-metastore-host:9870/iceberg/users&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ifDirExists&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;overwrite&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;users_connection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Export data from a table named &lt;code&gt;users_connection&lt;/code&gt; to an S3 location &lt;code&gt;s3://data-lake/iceberg/users&lt;/code&gt; managed under the Hive Metastore Iceberg catalog.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;icebergCatalog&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;hms&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsDB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;testdb&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsTable&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;users&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsUri&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;thrift://hive-metastore-host:9083&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s3://data-lake/iceberg/users&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ifDirExists&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;overwrite&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;users_connection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Output directory structure&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After a successful run, the directory specified in the examples contains the following structure:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;├── data 

│   ├── *.parquet 

└── metadata 

    ├── *.manifest.avro 

    ├── manifest-list.avro 

    └── v1.metadata.json 
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;All Parquet data files will be written to the data/subdirectory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All Iceberg metadata files will be written to the metadata/subdirectory.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;not-supported&#34;&gt;Not supported&lt;/h2&gt;
&lt;p&gt;The following items are not supported in this release; OpenText plans to address them in the upcoming release:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;No partition support: The export process does not partition data for Iceberg tables. All data is written as a single, flat structure without partitioned directories.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No complex data types: Only primitive data types (such as integers, strings, and dates) are supported. Complex types like arrays, maps, and structs cannot be exported.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No append or modify operations: You cannot append data to an existing Iceberg table or modify its contents. The export process supports only creating new tables or overwriting existing data completely.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXPORT TO JSON</title>
      <link>/en/sql-reference/statements/export-to-json/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/export-to-json/</guid>
      <description>
        
        
        &lt;p&gt;Exports a table, columns from a table, or query results to JSON files. The files can be read back into OpenText™ Analytics Database using &lt;a href=&#34;../../../en/sql-reference/statements/copy/parsers/fjsonparser/#&#34;&gt;FJSONPARSER&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are some limitations on the queries you can use in an export statement. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can export ROS‑format data and data from external tables in the OpenText™ Analytics Database, and you can also export data to Iceberg tables. The supported catalog types are &lt;code&gt;filesystem&lt;/code&gt;, &lt;code&gt;glue&lt;/code&gt;, and &lt;code&gt;hms&lt;/code&gt;. For more information, see &lt;a href=&#34;../../../en/sql-reference/statements/export-to-iceberg/#&#34;&gt;EXPORT TO ICEBERG&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;File exporters are UDxs that cannot be run in fenced mode. If the ForceUDxFencedMode configuration parameter is set to true to support other UDxs, you can set it to false at the session level before performing the export.&lt;/p&gt;
&lt;p&gt;This statement returns the number of rows written and logs information about exported files in a system table. See &lt;a href=&#34;../../../en/data-export/file-export/monitoring-exports/#&#34;&gt;Monitoring exports&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During an export to HDFS or an NFS mount point, the database writes files to a temporary directory in the same location as the destination and renames the directory when the export is complete. Do not attempt to use the files in the temporary directory. During an export to S3, GCS, or Azure, the database writes files directly to the destination path, so you must wait for the export to finish before reading the files. For more information, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPORT [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label&lt;/span&gt;)*/ ] TO JSON 
   ( directory=&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;&amp;#39;[, &lt;span class=&#34;code-variable&#34;&gt;param=value&lt;/span&gt;[,...] ] )
   [ OVER (&lt;span class=&#34;code-variable&#34;&gt;over-clause&lt;/span&gt; ) ] AS SELECT &lt;span class=&#34;code-variable&#34;&gt;query-expression&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;over-clause&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to partition table data using PARTITION BY. Within partitions you can sort using ORDER BY. See &lt;a href=&#34;../../../en/data-analysis/sql-analytics/#&#34;&gt;SQL analytics&lt;/a&gt;. This clause may contain column references but not expressions.
&lt;p&gt;If you partition data, the database creates a partition directory structure, transforming column names to lowercase. See &lt;a href=&#34;../../../en/data-load/partitioned-file-paths/#&#34;&gt;Partitioned data&lt;/a&gt; for a description of the directory structure. If you use the &lt;code&gt;fileName&lt;/code&gt; parameter, you cannot use partitioning.&lt;/p&gt;
&lt;p&gt;If you omit this clause, the database optimizes for maximum parallelism.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;query-expression&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the data to export. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt; for important limitations.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;directory&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The destination directory for the output files. The current user must have permission to write it. The destination can be on any of the following file systems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/hdfs-file-system/#&#34;&gt;HDFS file system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/s3-object-store/#&#34;&gt;S3 object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/google-cloud-storage-gcs-object-store/#&#34;&gt;Google Cloud Storage (GCS) object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/azure-blob-storage-object-store/#&#34;&gt;Azure Blob Storage object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Linux file system, either an NFS mount or local storage on each node&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See also: &lt;code&gt;ifDirExists&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ifDirExists&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;What to do if &lt;code&gt;directory&lt;/code&gt; already exists, one of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;fail&lt;/code&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;overwrite&lt;/code&gt;: replace the entire directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;append&lt;/code&gt;: export new files into the existing directory with a prepended hash that identifies all files in the exported batch&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;appendNoHash&lt;/code&gt;: export new files into the existing directory without a prepended hash; with this option, the database cannot clean up partial exports&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you specify &lt;code&gt;overwrite&lt;/code&gt; for an export to an object store, the existing directory is deleted recursively at the beginning of the operation and is not restored if the operation fails. Be careful not to export to a directory containing data you want to keep. For an export to a Linux file system or HDFS, the directory is only overwritten if the export succeeds.&lt;/p&gt;
&lt;p&gt;Do not do concurrent exports to the same directory. In particular, if you do so with a value of &lt;code&gt;overwrite&lt;/code&gt;, all operations appear to succeed, but the results are incorrect.&lt;/p&gt;
&lt;p&gt;When using &lt;code&gt;append&lt;/code&gt;, be careful to use the same table schema. Otherwise, queries of external tables using this data path could fail.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;If specified, all output is written to a single file of this name in the location specified by &lt;code&gt;directory&lt;/code&gt;. While the query can be processed by multiple nodes, only a single node generates the output data. The &lt;code&gt;fileSizeMB&lt;/code&gt; parameter is ignored, and the query cannot use partitioning in the OVER() clause.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filePrefix&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Prefix to use for exported files instead of the default hash. If used with &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;, choose a unique prefix to avoid overwriting existing files.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;omitNullFields&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Boolean, whether to omit &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/row/#&#34;&gt;ROW&lt;/a&gt; fields with null values.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; false&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;compression&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Compression type, one of:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Uncompressed&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;BZip&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;GZip&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; Uncompressed&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileSizeMB&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The maximum file size of a single output file. This value is a hint, not a hard limit. A value of 0 specifies no limit. If &lt;code&gt;filename&lt;/code&gt; is also specified, &lt;code&gt;fileSizeMB&lt;/code&gt; is ignored.&lt;/p&gt;
&lt;p&gt;This value affects the size of individual output files, not the total output size. For smaller values, the database divides the output into more files; all data is still exported.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10GB&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported files. You can specify the value in Unix octal format (such as &lt;code&gt;665&lt;/code&gt;) or &lt;em&gt;&lt;code&gt;user&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;group&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;other&lt;/code&gt;&lt;/em&gt; format—for example, &lt;code&gt;rwxr-xr-x&lt;/code&gt;. The value must be formatted as a string even if using the octal format.&lt;/p&gt;
&lt;p&gt;Valid octal values range between &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1777&lt;/code&gt;, inclusive. See &lt;a href=&#34;https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html&#34;&gt;HDFS Permissions&lt;/a&gt; in the Apache Hadoop documentation.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 660, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;dirMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported directories. Values follow the same rules as those for &lt;em&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/em&gt;. Further, you must give the HDFS user full permission, at least &lt;code&gt;rwx------&lt;/code&gt; or &lt;code&gt;700&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 755, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Source table: SELECT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Destination directory: Write&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a name=&#34;Query&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;query-restrictions&#34;&gt;Query restrictions&lt;/h2&gt;
&lt;p&gt;You must provide an alias column label for selected column targets that are expressions.&lt;/p&gt;
&lt;p&gt;If you partition the output, you cannot specify schema and table names in the SELECT statement. Specify only the column name.&lt;/p&gt;
&lt;p&gt;The query can contain only a single outer SELECT statement. For example, you cannot use UNION:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;JSON&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ERROR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8975&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Only&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;single&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;statement&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;is&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;supported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HINT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Please&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;use&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;subquery&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;multiple&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;statements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Instead, rewrite the query to use a subquery:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;JSON&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Exported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;             &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To use composite statements such as UNION, INTERSECT, and EXCEPT, rewrite them as subqueries.&lt;/p&gt;
&lt;h2 id=&#34;data-types&#34;&gt;Data types&lt;/h2&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;EXPORT TO JSON&lt;/span&gt; can export &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/array/#&#34;&gt;ARRAY&lt;/a&gt; and &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/row/#&#34;&gt;ROW&lt;/a&gt; types in any combination.&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;EXPORT TO JSON&lt;/span&gt; does not support binary output (VARBINARY).&lt;/p&gt;
&lt;h2 id=&#34;output&#34;&gt;Output&lt;/h2&gt;
&lt;p&gt;The export operation always creates (or appends to) an output directory, even if all output is written to a single file or the query produces zero rows.&lt;/p&gt;
&lt;p&gt;By default, output file names follow the pattern: &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;nodename&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;threadId&lt;/code&gt;&lt;/em&gt;&lt;code&gt;[-&lt;/code&gt;&lt;em&gt;&lt;code&gt;sequenceNumber&lt;/code&gt;&lt;/em&gt;&lt;code&gt;].&lt;/code&gt;&lt;em&gt;&lt;code&gt;extension&lt;/code&gt;&lt;/em&gt;. &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt; is typically an 8-character hash, but can be longer if the export appended to an existing directory. A sequence number is added if an export needs to be broken into pieces to satisfy &lt;code&gt;fileSizeMB&lt;/code&gt;. You can change the prefix using the &lt;code&gt;filePrefix&lt;/code&gt; parameter or, for appends, by setting &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;. You can write all output to a single named file using the &lt;code&gt;filename&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;Column names in partition directories are lowercase.&lt;/p&gt;
&lt;p&gt;Files exported to a local file system by any OpenText™ Analytics Database user are owned by the database superuser. Files exported to HDFS or object stores are owned by the database user who exported the data.&lt;/p&gt;
&lt;p&gt;Making concurrent exports to the same output destination is an error and can produce incorrect results.&lt;/p&gt;
&lt;p&gt;Exports to the local file system can be to an NFS mount (shared) or to the Linux file system on each node (non-shared). For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-linux-file-system/#&#34;&gt;Exporting to the Linux file system&lt;/a&gt;. Exports to non-shared local file systems have the following restrictions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The output directory must not exist on any node.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You must have a USER storage location or superuser privileges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot override the permissions mode of 700 for directories and 600 for files.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Exports to object-store file systems are not atomic. Be careful to wait for the export to finish before using the data. For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;In the following example, one of the ROW elements has a null value, which is omitted in the output. EXPORT TO JSON writes each JSON record on one line; line breaks have been inserted into the following output for readability:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;menu&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restaurants&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;       &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;                                     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;menu&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-------------------+------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Bob&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s pizzeria    | [{&amp;#34;item&amp;#34;:&amp;#34;cheese pizza&amp;#34;,&lt;span class=&#34;code-input&#34;&gt;&#34;price&#34;:null&lt;/span&gt;},{&amp;#34;item&amp;#34;:&amp;#34;spinach pizza&amp;#34;,&amp;#34;price&amp;#34;:10.5}]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt; Bakersfield Tacos | [{&amp;#34;item&amp;#34;:&amp;#34;veggie taco&amp;#34;,&amp;#34;price&amp;#34;:9.95},{&amp;#34;item&amp;#34;:&amp;#34;steak taco&amp;#34;,&amp;#34;price&amp;#34;:10.95}]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;(2 rows)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;=&amp;gt; EXPORT TO JSON (directory=&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;output&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;, omitNullFields=true)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;   AS SELECT * FROM restaurants;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt; Rows Exported
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;---------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;             2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;(1 row)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;=&amp;gt; \! cat /output/json/*.json
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;{&amp;#34;name&amp;#34;:&amp;#34;Bob&amp;#39;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pizzeria&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cuisine&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Italian&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;location_city&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:[&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Cambridge&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Pittsburgh&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;],
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt; &lt;span class=&#34;code-input&#34;&gt;&#34;menu&#34;:[{&#34;item&#34;:&#34;cheese pizza&#34;}&lt;/span&gt;,{&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;spinach&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pizza&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;price&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:10.5}]}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;{&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Bakersfield&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Tacos&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cuisine&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Mexican&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;location_city&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:[&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Pittsburgh&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;],
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt; &amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;menu&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:[{&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;veggie&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;taco&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;price&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:9.95},{&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;steak&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;taco&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;price&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;:10.95}]}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXPORT TO ORC</title>
      <link>/en/sql-reference/statements/export-to-orc/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/export-to-orc/</guid>
      <description>
        
        
        &lt;p&gt;Exports a table, columns from a table, or query results to files in the ORC format.&lt;/p&gt;
&lt;p&gt;You can use an OVER() clause to partition the data before export. You can partition data instead of or in addition to exporting the column data. Partitioning data can improve query performance by enabling partition pruning. See &lt;a href=&#34;../../../en/data-load/partitioned-file-paths/#&#34;&gt;Partitioned data&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are some limitations on the queries you can use in an export statement. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can export ROS‑format data and data from external tables in the OpenText™ Analytics Database, and you can also export data to Iceberg tables. The supported catalog types are &lt;code&gt;filesystem&lt;/code&gt;, &lt;code&gt;glue&lt;/code&gt;, and &lt;code&gt;hms&lt;/code&gt;. For more information, see &lt;a href=&#34;../../../en/sql-reference/statements/export-to-iceberg/#&#34;&gt;EXPORT TO ICEBERG&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;File exporters are UDxs that cannot be run in fenced mode. If the ForceUDxFencedMode configuration parameter is set to true to support other UDxs, you can set it to false at the session level before performing the export.&lt;/p&gt;
&lt;p&gt;This statement returns the number of rows written and logs information about exported files in a system table. See &lt;a href=&#34;../../../en/data-export/file-export/monitoring-exports/#&#34;&gt;Monitoring exports&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During an export to HDFS or an NFS mount point, the database writes files to a temporary directory in the same location as the destination and renames the directory when the export is complete. Do not attempt to use the files in the temporary directory. During an export to S3, GCS, or Azure, the database writes files directly to the destination path, so you must wait for the export to finish before reading the files. For more information, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPORT [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ] TO ORC 
   ( directory=&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;&amp;#39;[, &lt;span class=&#34;code-variable&#34;&gt;param=value&lt;/span&gt;[,...] ] )
   [ OVER (&lt;span class=&#34;code-variable&#34;&gt;over-clause&lt;/span&gt; ) ] AS SELECT &lt;span class=&#34;code-variable&#34;&gt;query-expression&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;over-clause&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to partition table data using PARTITION BY. Within partitions you can sort using ORDER BY. See &lt;a href=&#34;../../../en/data-analysis/sql-analytics/#&#34;&gt;SQL analytics&lt;/a&gt;. This clause may contain column references but not expressions.
&lt;p&gt;If you partition data, the database creates a partition directory structure, transforming column names to lowercase. See &lt;a href=&#34;../../../en/data-load/partitioned-file-paths/#&#34;&gt;Partitioned data&lt;/a&gt; for a description of the directory structure. If you use the &lt;code&gt;fileName&lt;/code&gt; parameter, you cannot use partitioning.&lt;/p&gt;
&lt;p&gt;If you omit this clause, the database optimizes for maximum parallelism.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;query-expression&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the data to export. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt; for important limitations.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;directory&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The destination directory for the output files. The current user must have permission to write it. The destination can be on any of the following file systems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/hdfs-file-system/#&#34;&gt;HDFS file system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/s3-object-store/#&#34;&gt;S3 object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/google-cloud-storage-gcs-object-store/#&#34;&gt;Google Cloud Storage (GCS) object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/azure-blob-storage-object-store/#&#34;&gt;Azure Blob Storage object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Linux file system, either an NFS mount or local storage on each node&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See also: &lt;code&gt;ifDirExists&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ifDirExists&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;What to do if &lt;code&gt;directory&lt;/code&gt; already exists, one of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;fail&lt;/code&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;overwrite&lt;/code&gt;: replace the entire directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;append&lt;/code&gt;: export new files into the existing directory with a prepended hash that identifies all files in the exported batch&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;appendNoHash&lt;/code&gt;: export new files into the existing directory without a prepended hash; with this option, the database cannot clean up partial exports&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you specify &lt;code&gt;overwrite&lt;/code&gt; for an export to an object store, the existing directory is deleted recursively at the beginning of the operation and is not restored if the operation fails. Be careful not to export to a directory containing data you want to keep. For an export to a Linux file system or HDFS, the directory is only overwritten if the export succeeds.&lt;/p&gt;
&lt;p&gt;Do not do concurrent exports to the same directory. In particular, if you do so with a value of &lt;code&gt;overwrite&lt;/code&gt;, all operations appear to succeed, but the results are incorrect.&lt;/p&gt;
&lt;p&gt;When using &lt;code&gt;append&lt;/code&gt;, be careful to use the same table schema. Otherwise, queries of external tables using this data path could fail.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;If specified, all output is written to a single file of this name in the location specified by &lt;code&gt;directory&lt;/code&gt;. While the query can be processed by multiple nodes, only a single node generates the output data. The &lt;code&gt;fileSizeMB&lt;/code&gt; parameter is ignored, and the query cannot use partitioning in the OVER() clause.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filePrefix&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Prefix to use for exported files instead of the default hash. If used with &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;, choose a unique prefix to avoid overwriting existing files.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;compression&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Column compression type, one of:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Zlib&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Uncompressed&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; Zlib&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;stripeSizeMB&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The uncompressed size of exported stripes in MB, an integer value between 1 and 1024, inclusive.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 250&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;rowIndexStride&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer that specifies how frequently the exporter builds indexing statistics in the output, between 1 and 1000000 (1 million), inclusive. A value of 0 disables indexing. The exporter builds statistics after every &lt;code&gt;rowIndexStride&lt;/code&gt; rows in each stripe, or once for stripes &amp;lt; &lt;code&gt;rowIndexStride&lt;/code&gt;.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1000&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileSizeMB&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The maximum file size of a single output file. This value is a hint, not a hard limit. A value of 0 specifies no limit. If &lt;code&gt;filename&lt;/code&gt; is also specified, &lt;code&gt;fileSizeMB&lt;/code&gt; is ignored.&lt;/p&gt;
&lt;p&gt;This value affects the size of individual output files, not the total output size. For smaller values, the database divides the output into more files; all data is still exported.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10GB&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported files. You can specify the value in Unix octal format (such as &lt;code&gt;665&lt;/code&gt;) or &lt;em&gt;&lt;code&gt;user&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;group&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;other&lt;/code&gt;&lt;/em&gt; format—for example, &lt;code&gt;rwxr-xr-x&lt;/code&gt;. The value must be formatted as a string even if using the octal format.&lt;/p&gt;
&lt;p&gt;Valid octal values range between &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1777&lt;/code&gt;, inclusive. See &lt;a href=&#34;https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html&#34;&gt;HDFS Permissions&lt;/a&gt; in the Apache Hadoop documentation.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 660, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;dirMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported directories. Values follow the same rules as those for &lt;em&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/em&gt;. Further, you must give the HDFS user full permission, at least &lt;code&gt;rwx------&lt;/code&gt; or &lt;code&gt;700&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 755, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Source table: SELECT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Destination directory: Write&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a name=&#34;Query&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;query-restrictions&#34;&gt;Query restrictions&lt;/h2&gt;
&lt;p&gt;You must provide an alias column label for selected column targets that are expressions.&lt;/p&gt;
&lt;p&gt;If you partition the output, you cannot specify schema and table names in the SELECT statement. Specify only the column name.&lt;/p&gt;
&lt;p&gt;The query can contain only a single outer SELECT statement. For example, you cannot use UNION:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ORC&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ERROR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8975&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Only&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;single&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;statement&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;is&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;supported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HINT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Please&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;use&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;subquery&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;multiple&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;statements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Instead, rewrite the query to use a subquery:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ORC&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Exported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;             &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To use composite statements such as UNION, INTERSECT, and EXCEPT, rewrite them as subqueries.&lt;/p&gt;
&lt;h2 id=&#34;data-types&#34;&gt;Data types&lt;/h2&gt;
&lt;p&gt;EXPORT TO ORC converts OpenText™ Analytics Database data types to Hive data types as shown in the following table.

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
OpenText™ Analytics Database Data Type&lt;/th&gt; 

&lt;th &gt;
Hive Data Type&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


INTEGER, BIGINT&lt;/td&gt; 

&lt;td &gt;


BIGINT&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


FLOAT, DECIMAL, SMALLINT, TINYINT, CHAR, BOOLEAN&lt;/td&gt; 

&lt;td &gt;


Corresponding Hive type&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VARCHAR, LONG VARCHAR&lt;/td&gt; 

&lt;td &gt;
VARCHAR (max 64KB) or STRING (can be read as either)&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


BINARY, VARBINARY, LONG VARBINARY&lt;/td&gt; 

&lt;td &gt;


BINARY&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
DATE&lt;/td&gt; 

&lt;td &gt;


DATE if supported by your version of Hive, otherwise INT96 (can be read as TIMESTAMP)&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


TIMESTAMP, TIMESTAMPTZ&lt;/td&gt; 

&lt;td &gt;


TIMESTAMP. The database does not convert TIMESTAMP values to UTC. To avoid problems arising from time zones, use TIMESTAMPTZ instead of TIMESTAMP.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
TIME, TIMEZ, INTERVAL, UUID&lt;/td&gt; 

&lt;td &gt;
Not supported&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
ARRAY, SET&lt;/td&gt; 

&lt;td &gt;
Not supported&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
ROW&lt;/td&gt; 

&lt;td &gt;
Not supported&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;Decimal precision must be &amp;lt;= 38.&lt;/p&gt;
&lt;p&gt;The exported Hive types might not be identical to the database types. For example, a database INT is exported as a Hive BIGINT. When defining Hive external tables to read exported data, you might have to adjust column definitions.&lt;/p&gt;
&lt;p&gt;This operation exports raw Flex columns as binary data.&lt;/p&gt;
&lt;h2 id=&#34;output&#34;&gt;Output&lt;/h2&gt;
&lt;p&gt;The export operation always creates (or appends to) an output directory, even if all output is written to a single file or the query produces zero rows.&lt;/p&gt;
&lt;p&gt;By default, output file names follow the pattern: &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;nodename&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;threadId&lt;/code&gt;&lt;/em&gt;&lt;code&gt;[-&lt;/code&gt;&lt;em&gt;&lt;code&gt;sequenceNumber&lt;/code&gt;&lt;/em&gt;&lt;code&gt;].&lt;/code&gt;&lt;em&gt;&lt;code&gt;extension&lt;/code&gt;&lt;/em&gt;. &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt; is typically an 8-character hash, but can be longer if the export appended to an existing directory. A sequence number is added if an export needs to be broken into pieces to satisfy &lt;code&gt;fileSizeMB&lt;/code&gt;. You can change the prefix using the &lt;code&gt;filePrefix&lt;/code&gt; parameter or, for appends, by setting &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;. You can write all output to a single named file using the &lt;code&gt;filename&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;Column names in partition directories are lowercase.&lt;/p&gt;
&lt;p&gt;Files exported to a local file system by any OpenText™ Analytics Database user are owned by the database superuser. Files exported to HDFS or object stores are owned by the database user who exported the data.&lt;/p&gt;
&lt;p&gt;Making concurrent exports to the same output destination is an error and can produce incorrect results.&lt;/p&gt;
&lt;p&gt;Exports to the local file system can be to an NFS mount (shared) or to the Linux file system on each node (non-shared). For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-linux-file-system/#&#34;&gt;Exporting to the Linux file system&lt;/a&gt;. Exports to non-shared local file systems have the following restrictions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The output directory must not exist on any node.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You must have a USER storage location or superuser privileges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot override the permissions mode of 700 for directories and 600 for files.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Exports to object-store file systems are not atomic. Be careful to wait for the export to finish before using the data. For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example demonstrates partitioning and exporting data. EXPORT TO ORC first partitions the data on region and then, within each partition, sorts by store.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ORC&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;gs://DataLake/user2/data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ORDER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;price&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;JOIN&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;vendor&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;distribID&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For more examples, see &lt;a href=&#34;../../../en/sql-reference/statements/export-to-parquet/#&#34;&gt;EXPORT TO PARQUET&lt;/a&gt;, which (aside from a few parameters) behaves the same as EXPORT TO ORC.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXPORT TO PARQUET</title>
      <link>/en/sql-reference/statements/export-to-parquet/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/export-to-parquet/</guid>
      <description>
        
        
        &lt;p&gt;Exports a table, columns from a table, or query results to files in the Parquet format.&lt;/p&gt;
&lt;p&gt;You can use an OVER() clause to partition the data before export. You can partition data instead of or in addition to exporting the column data. Partitioning data can improve query performance by enabling partition pruning. See &lt;a href=&#34;../../../en/data-load/partitioned-file-paths/#&#34;&gt;Partitioned data&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are some limitations on the queries you can use in an export statement. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can export ROS‑format data and data from external tables in the OpenText™ Analytics Database, and you can also export data to Iceberg tables. The supported catalog types are &lt;code&gt;filesystem&lt;/code&gt;, &lt;code&gt;glue&lt;/code&gt;, and &lt;code&gt;hms&lt;/code&gt;. For more information, see &lt;a href=&#34;../../../en/sql-reference/statements/export-to-iceberg/#&#34;&gt;EXPORT TO ICEBERG&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;File exporters are UDxs that cannot be run in fenced mode. If the ForceUDxFencedMode configuration parameter is set to true to support other UDxs, you can set it to false at the session level before performing the export.&lt;/p&gt;
&lt;p&gt;This statement returns the number of rows written and logs information about exported files in a system table. See &lt;a href=&#34;../../../en/data-export/file-export/monitoring-exports/#&#34;&gt;Monitoring exports&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During an export to HDFS or an NFS mount point, the database writes files to a temporary directory in the same location as the destination and renames the directory when the export is complete. Do not attempt to use the files in the temporary directory. During an export to S3, GCS, or Azure, the database writes files directly to the destination path, so you must wait for the export to finish before reading the files. For more information, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you export data, you can use the &lt;a href=&#34;../../../en/sql-reference/functions/hadoop-functions/get-metadata/#&#34;&gt;GET_METADATA&lt;/a&gt; function to inspect the results.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPORT [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ] TO PARQUET 
   (directory=&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;&amp;#39;[, &lt;span class=&#34;code-variable&#34;&gt;param=value&lt;/span&gt;[,...] ] )
   [ OVER (&lt;span class=&#34;code-variable&#34;&gt;over-clause&lt;/span&gt; ) ] AS SELECT &lt;span class=&#34;code-variable&#34;&gt;query-expression&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;over-clause&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to partition table data using PARTITION BY. Within partitions you can sort using ORDER BY. See &lt;a href=&#34;../../../en/data-analysis/sql-analytics/#&#34;&gt;SQL analytics&lt;/a&gt;. This clause may contain column references but not expressions.
&lt;p&gt;If you partition data, the database creates a partition directory structure, transforming column names to lowercase. See &lt;a href=&#34;../../../en/data-load/partitioned-file-paths/#&#34;&gt;Partitioned data&lt;/a&gt; for a description of the directory structure. If you use the &lt;code&gt;fileName&lt;/code&gt; parameter, you cannot use partitioning.&lt;/p&gt;
&lt;p&gt;If you omit this clause, the database optimizes for maximum parallelism.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;query-expression&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the data to export. See &lt;a href=&#34;#Query&#34;&gt;Query Restrictions&lt;/a&gt; for important limitations.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;icebergCatalog&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the catalog that manages the Iceberg table and stores its metadata.
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;filesystem: Stores Iceberg metadata in a local or distributed filesystem.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;glue: Stores Iceberg metadata in AWS Glue. Requires the &lt;code&gt;glueDB&lt;/code&gt; and &lt;code&gt;glueTable&lt;/code&gt; parameters.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;glueDB&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the AWS Glue database. The &lt;code&gt;glueTable&lt;/code&gt; parameter must also be specified.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;glueTable&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the AWS Glue table. The &lt;code&gt;glueDB&lt;/code&gt; parameter must also be specified.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;hms: Stores Iceberg table metadata to the exported HMS directory and automatically registers the table in HMS using the connection information you provide.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;hmsDB&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the Hive database. The &lt;code&gt;hmsTable&lt;/code&gt; parameter must also be specified.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;hmsTable&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the Hive table. The &lt;code&gt;hmsDB&lt;/code&gt; parameter must also be specified.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;hmsUri&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;URI of the Hive metastore in the format &#39;thrift://host:port&#39;. This provides the address of the Hive Metastore service hosting the specified HMS database (hmsDB).&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information, see &lt;a href=&#34;../../../en/sql-reference/statements/export-to-iceberg/#&#34;&gt;EXPORT TO ICEBERG&lt;/a&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;directory&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The destination directory for the output files. The current user must have permission to write it. The destination can be on any of the following file systems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/hdfs-file-system/#&#34;&gt;HDFS file system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/s3-object-store/#&#34;&gt;S3 object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/google-cloud-storage-gcs-object-store/#&#34;&gt;Google Cloud Storage (GCS) object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/file-systems-and-object-stores/azure-blob-storage-object-store/#&#34;&gt;Azure Blob Storage object store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Linux file system, either an NFS mount or local storage on each node&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See also: &lt;code&gt;ifDirExists&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ifDirExists&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;What to do if &lt;code&gt;directory&lt;/code&gt; already exists, one of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;fail&lt;/code&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;overwrite&lt;/code&gt;: replace the entire directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;append&lt;/code&gt;: export new files into the existing directory with a prepended hash that identifies all files in the exported batch&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;appendNoHash&lt;/code&gt;: export new files into the existing directory without a prepended hash; with this option, the database cannot clean up partial exports&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you specify &lt;code&gt;overwrite&lt;/code&gt; for an export to an object store, the existing directory is deleted recursively at the beginning of the operation and is not restored if the operation fails. Be careful not to export to a directory containing data you want to keep. For an export to a Linux file system or HDFS, the directory is only overwritten if the export succeeds.&lt;/p&gt;
&lt;p&gt;Do not do concurrent exports to the same directory. In particular, if you do so with a value of &lt;code&gt;overwrite&lt;/code&gt;, all operations appear to succeed, but the results are incorrect.&lt;/p&gt;
&lt;p&gt;When using &lt;code&gt;append&lt;/code&gt;, be careful to use the same table schema. Otherwise, queries of external tables using this data path could fail.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;If specified, all output is written to a single file of this name in the location specified by &lt;code&gt;directory&lt;/code&gt;. While the query can be processed by multiple nodes, only a single node generates the output data. The &lt;code&gt;fileSizeMB&lt;/code&gt; parameter is ignored, and the query cannot use partitioning in the OVER() clause.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;filePrefix&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Prefix to use for exported files instead of the default hash. If used with &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;, choose a unique prefix to avoid overwriting existing files.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;compression&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Column compression type, one of:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Snappy&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;GZIP&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Brotli&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ZSTD&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Uncompressed&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; Snappy&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;rowGroupSizeMB&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The uncompressed size of exported row groups, in MB, an integer value between 1 and &lt;code&gt;fileSizeMB&lt;/code&gt; , inclusive, or unlimited if &lt;code&gt;fileSizeMB&lt;/code&gt; is 0.
&lt;p&gt;The row groups in the exported files are smaller than this value because Parquet files are compressed on write. For best performance when exporting to HDFS, set &lt;em&gt;&lt;code&gt;size&lt;/code&gt;&lt;/em&gt; to be smaller than the HDFS block size.&lt;/p&gt;
&lt;p&gt;Row-group size affects memory consumption during export. An export thread consumes at least double the row-group size. The default value of 512MB is a compromise between writing larger row groups and allowing enough free memory for other OpenText™ Analytics Database operations. If you perform exports when the database is not otherwise under heavy load, you can improve read performance on the exported data by increasing row-group size on export. However, row groups that span multiple blocks on HDFS decrease read performance by requiring more I/O, so do not set the row-group size to be larger than your HDFS block size.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 512&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileSizeMB&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The maximum file size of a single output file. This value is a hint, not a hard limit. A value of 0 specifies no limit. If &lt;code&gt;filename&lt;/code&gt; is also specified, &lt;code&gt;fileSizeMB&lt;/code&gt; is ignored.&lt;/p&gt;
&lt;p&gt;This value affects the size of individual output files, not the total output size. For smaller values, the database divides the output into more files; all data is still exported.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10GB&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported files. You can specify the value in Unix octal format (such as &lt;code&gt;665&lt;/code&gt;) or &lt;em&gt;&lt;code&gt;user&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;group&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;other&lt;/code&gt;&lt;/em&gt; format—for example, &lt;code&gt;rwxr-xr-x&lt;/code&gt;. The value must be formatted as a string even if using the octal format.&lt;/p&gt;
&lt;p&gt;Valid octal values range between &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1777&lt;/code&gt;, inclusive. See &lt;a href=&#34;https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html&#34;&gt;HDFS Permissions&lt;/a&gt; in the Apache Hadoop documentation.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 660, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;dirMode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;For writes to HDFS only, permission to apply to all exported directories. Values follow the same rules as those for &lt;em&gt;&lt;code&gt;fileMode&lt;/code&gt;&lt;/em&gt;. Further, you must give the HDFS user full permission, at least &lt;code&gt;rwx------&lt;/code&gt; or &lt;code&gt;700&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When writing files to any destination other than HDFS, this parameter has no effect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 755, regardless of the value of &lt;code&gt;fs.permissions.umask-mode&lt;/code&gt; in &lt;code&gt;hdfs-site.xml&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;int96AsTimestamp&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Boolean, specifies whether to export timestamps as int96 physical type (true) or int64 physical type (false).
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; true&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Source table: SELECT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Destination directory: Write&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a name=&#34;Query&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;query-restrictions&#34;&gt;Query restrictions&lt;/h2&gt;
&lt;p&gt;You must provide an alias column label for selected column targets that are expressions.&lt;/p&gt;
&lt;p&gt;If you partition the output, you cannot specify schema and table names in the SELECT statement. Specify only the column name.&lt;/p&gt;
&lt;p&gt;The query can contain only a single outer SELECT statement. For example, you cannot use UNION:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ERROR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8975&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Only&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;single&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;statement&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;is&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;supported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HINT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Please&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;use&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;subquery&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;multiple&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;outer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;statements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Instead, rewrite the query to use a subquery:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/mnt/shared_nfs/accounts/rm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;UNION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ALL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hash&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Exported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;             &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To use composite statements such as UNION, INTERSECT, and EXCEPT, rewrite them as subqueries.&lt;/p&gt;

&lt;h2 id=&#34;data-types&#34;&gt;Data types&lt;/h2&gt;
&lt;p&gt;EXPORT TO PARQUET converts database data types to Hive data types as shown in the following table.

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
Database Data Type&lt;/th&gt; 

&lt;th &gt;
Hive Data Type&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
INTEGER, BIGINT&lt;/td&gt; 

&lt;td &gt;
BIGINT&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
FLOAT, DECIMAL, SMALLINT, TINYINT, CHAR, BOOLEAN&lt;/td&gt; 

&lt;td &gt;
Corresponding Hive type&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VARCHAR, LONG VARCHAR&lt;/td&gt; 

&lt;td &gt;
VARCHAR (max 64KB) or STRING (can be read as either)&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
BINARY, VARBINARY, LONG VARBINARY&lt;/td&gt; 

&lt;td &gt;
BINARY&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
DATE&lt;/td&gt; 

&lt;td &gt;
DATE if supported by your version of Hive, otherwise INT96 (can be read as TIMESTAMP)&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
TIMESTAMP, TIMESTAMPTZ&lt;/td&gt; 

&lt;td &gt;
TIMESTAMP. The database does not convert TIMESTAMP values to UTC. To avoid problems arising from time zones, use TIMESTAMPTZ instead of TIMESTAMP.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
INTERVAL&lt;/td&gt; 

&lt;td &gt;
INT64&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
TIME&lt;/td&gt; 

&lt;td &gt;
INT64&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
TIMETZ&lt;/td&gt; 

&lt;td &gt;
Not supported&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
ARRAY&lt;/td&gt; 

&lt;td &gt;
ARRAY&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
SET&lt;/td&gt; 

&lt;td &gt;
Not supported&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
ROW&lt;/td&gt; 

&lt;td &gt;
STRUCT&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;Decimal precision must be &amp;lt;= 153.&lt;/p&gt;
&lt;p&gt;The exported Hive types might not be identical to the database types. For example, a database INT is exported as a Hive BIGINT. When defining Hive external tables to read exported data, you might have to adjust column definitions.&lt;/p&gt;
&lt;p&gt;This operation exports raw Flex columns as binary data.&lt;/p&gt;
&lt;h2 id=&#34;output&#34;&gt;Output&lt;/h2&gt;
&lt;p&gt;The export operation always creates (or appends to) an output directory, even if all output is written to a single file or the query produces zero rows.&lt;/p&gt;
&lt;p&gt;By default, output file names follow the pattern: &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;nodename&lt;/code&gt;&lt;/em&gt;&lt;code&gt;-&lt;/code&gt;&lt;em&gt;&lt;code&gt;threadId&lt;/code&gt;&lt;/em&gt;&lt;code&gt;[-&lt;/code&gt;&lt;em&gt;&lt;code&gt;sequenceNumber&lt;/code&gt;&lt;/em&gt;&lt;code&gt;].&lt;/code&gt;&lt;em&gt;&lt;code&gt;extension&lt;/code&gt;&lt;/em&gt;. &lt;em&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;/em&gt; is typically an 8-character hash, but can be longer if the export appended to an existing directory. A sequence number is added if an export needs to be broken into pieces to satisfy &lt;code&gt;fileSizeMB&lt;/code&gt;. You can change the prefix using the &lt;code&gt;filePrefix&lt;/code&gt; parameter or, for appends, by setting &lt;code&gt;ifDirExists=appendNoHash&lt;/code&gt;. You can write all output to a single named file using the &lt;code&gt;filename&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;Column names in partition directories are lowercase.&lt;/p&gt;
&lt;p&gt;Files exported to a local file system by any OpenText™ Analytics Database user are owned by the database superuser. Files exported to HDFS or object stores are owned by the database user who exported the data.&lt;/p&gt;
&lt;p&gt;Making concurrent exports to the same output destination is an error and can produce incorrect results.&lt;/p&gt;
&lt;p&gt;Exports to the local file system can be to an NFS mount (shared) or to the Linux file system on each node (non-shared). For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-linux-file-system/#&#34;&gt;Exporting to the Linux file system&lt;/a&gt;. Exports to non-shared local file systems have the following restrictions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The output directory must not exist on any node.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You must have a USER storage location or superuser privileges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot override the permissions mode of 700 for directories and 600 for files.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Exports to object-store file systems are not atomic. Be careful to wait for the export to finish before using the data. For details, see &lt;a href=&#34;../../../en/data-export/file-export/exporting-to-object-stores/#&#34;&gt;Exporting to object stores&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example demonstrates exporting all columns from theT1 table in the public schema, using GZIP compression.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;webhdfs:///user1/data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;compression&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;gzip&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example demonstrates exporting the results of a query using more than one table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s3://DataLake/sales_by_region&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;price&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;JOIN&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;vendor&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;distribID&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example demonstrates partitioning and exporting data. EXPORT TO PARQUET first partitions the data on region and then, within each partition, sorts by store.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;gs://DataLake/user2/data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARTITION&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ORDER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;price&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sales&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;JOIN&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;vendor&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;distribID&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;store&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example uses an alias column label for a selected column target that is an expression.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;webhdfs:///user3/data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ORDER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;A&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example sets permissions for the output.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;webhdfs:///user1/data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;fileMode&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;432&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dirMode&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;rwxrw-r-x&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example demonstrates exporting data to an Iceberg table and then registering it in Hive Metastore (HMS).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXPORT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PARQUET&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;icebergCatalog&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;hms&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsDB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;analytics&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsTable&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;sales_by_district&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hmsUri&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;thrift://172.17.0.101:9083&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;webhdfs://172.17.0.99:9870/data/sales_by_region&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ifDirExists&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;overwrite&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;public_sales_connection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EXPORT TO VERTICA</title>
      <link>/en/sql-reference/statements/export-to/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/export-to/</guid>
      <description>
        
        
        &lt;p&gt;Exports table data from one OpenText™ Analytics Database to another. A connection to the target database must exist in the current session before starting the copy operation. Otherwise, the database returns an error. For details, see &lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#&#34;&gt;CONNECT TO VERTICA&lt;/a&gt;.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
The source database must be no more than one major release behind the target database.
&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPORT [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ] TO VERTICA
   [[ { &lt;span class=&#34;code-variable&#34;&gt;target-db&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;target-ns&lt;/span&gt; }.]&lt;span class=&#34;code-variable&#34;&gt;target-schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;target-table&lt;/span&gt; [ ( &lt;span class=&#34;code-variable&#34;&gt;target-columns&lt;/span&gt; ) ]
   { AS SELECT &lt;span class=&#34;code-variable&#34;&gt;query-expression&lt;/span&gt; | FROM [[&lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.&lt;/span&gt;]&lt;span class=&#34;code-variable&#34;&gt;source-table&lt;/span&gt;[ ( &lt;span class=&#34;code-variable&#34;&gt;source-columns&lt;/span&gt; ) ] }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-db&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The target database to which data is exported. A connection to this database must already exist in the current session before starting the copy operation; otherwise the database returns an error. For details, see &lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#&#34;&gt;CONNECT TO VERTICA&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-ns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;For Eon Mode databases, &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; in the target database to which data is exported. If unspecified, the target namespace is &lt;code&gt;default_namespace&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The target schema to which data is exported, or &lt;code&gt;public&lt;/code&gt; if not specified.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table in the target database to store the exported data. The table cannot have columns of &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/&#34;&gt;complex data types&lt;/a&gt; other than native arrays.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of columns in &lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt; in which to store the exported data.See &lt;a href=&#34;#Mapping&#34;&gt;Mapping Between Source and Target Columns&lt;/a&gt;, below.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;query-expression&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The data to export.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;[[&lt;/code&gt;&lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema.&lt;/code&gt;&lt;/em&gt;&lt;code&gt;]&lt;/code&gt;&lt;em&gt;&lt;code&gt;source-table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table in the source database that contains the data to export. The namespace option only applies to Eon Mode databases and defaults to &lt;code&gt;default_namespace&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;source-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of the columns in the source table to export. The table cannot have columns of complex data types.See &lt;a href=&#34;#Mapping&#34;&gt;Mapping Between Source and Target Columns&lt;/a&gt;, below.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Source table: SELECT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Target table: INSERT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Target table schema: USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Mapping&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;mapping-between-source-and-target-columns&#34;&gt;Mapping between source and target columns&lt;/h2&gt;
&lt;p&gt;If you export all table data from one database to another, &lt;span class=&#34;sql&#34;&gt;EXPORT TO VERTICA&lt;/span&gt; can omit specifying column lists if column definitions in both tables comply with the following conditions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Same number of columns&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Identical column names&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Same sequence of columns&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Matching or &lt;a href=&#34;../../../en/sql-reference/data-types/data-type-coercion-chart/&#34;&gt;compatible&lt;/a&gt; column data types&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No complex data types (ARRAY, SET, or ROW), except for native arrays&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If any of these conditions is not true, the &lt;span class=&#34;sql&#34;&gt;EXPORT TO VERTICA&lt;/span&gt; statement must include column lists that explicitly map source and target columns to each other, as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Contain the same number of columns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;List source and target columns in the same order.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pair columns with the same (or &lt;a href=&#34;../../../en/sql-reference/data-types/data-type-coercion-chart/&#34;&gt;compatible&lt;/a&gt;) data types.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/data-export/db-export-and-import/exporting-data-to-another-db/#&#34;&gt;Exporting data to another database&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/data-export/db-export-and-import/handling-node-failure-during-copyexport/#&#34;&gt;Handling node failure during copy/export&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/copy-from/#&#34;&gt;COPY FROM VERTICA&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: GET DIRECTED QUERY</title>
      <link>/en/sql-reference/statements/get-directed-query/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/get-directed-query/</guid>
      <description>
        
        
        &lt;p&gt;Queries the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/directed-queries/#&#34;&gt;DIRECTED_QUERIES&lt;/a&gt; system table on the specified input query, and returns details of all directed queries that map to the input query. For details about output, see &lt;a href=&#34;../../../en/admin/managing-queries/directed-queries/managing-directed-queries/#&#34;&gt;Managing directed queries&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;GET DIRECTED QUERY &lt;span class=&#34;code-variable&#34;&gt;input-query&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-query&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;An input query that is associated with one or more directed queries.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/managing-queries/directed-queries/managing-directed-queries/#&#34;&gt;Managing directed queries&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: GRANT statements</title>
      <link>/en/sql-reference/statements/grant-statements/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/grant-statements/</guid>
      <description>
        
        
        &lt;p&gt;GRANT statements grant privileges on database objects to &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-users/&#34;&gt;users&lt;/a&gt; and &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-roles/&#34;&gt;roles&lt;/a&gt;.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
In a database with trust authentication, GRANT statements appear to work as expected but have no real effect on database security.
&lt;/div&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: INSERT</title>
      <link>/en/sql-reference/statements/insert/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/insert/</guid>
      <description>
        
        
        &lt;p&gt;Inserts values into all projections of the specified table. You must insert one complete tuple at a time. If no projections are associated with the target table, OpenText™ Analytics Database creates a superprojection to store the inserted values.&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;INSERT&lt;/span&gt; works for flex tables as well as regular native tables. If the table has real columns, inserted data of scalar types and native arrays of scalar types is added to both the real column and the &lt;code&gt;__raw__&lt;/code&gt; column. For data of &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/&#34;&gt;complex types&lt;/a&gt;, the values are not added to the &lt;code&gt;__raw__&lt;/code&gt; column.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;INSERT [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ] 
  INTO [[{ &lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt; }.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;table-name &lt;/span&gt;
  [ ( &lt;span class=&#34;code-variable&#34;&gt;column-list&lt;/span&gt; ) ]
  { DEFAULT VALUES | VALUES ( &lt;span class=&#34;code-variable&#34;&gt;values-list&lt;/span&gt; )[,...] | &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/#&#34;&gt;SELECT query-expression&lt;/a&gt;&lt;/span&gt; }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;{ &lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt; &lt;code&gt;|&lt;/code&gt; &lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the database or &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; that contains &lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Database name: If specified, it must be the current database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Namespace name (Eon Mode only): You must specify the namespace of objects in non-default namespaces. If no namespace is provided, it is assumed the object is in the default namespace.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the schema, by default &lt;code&gt;public&lt;/code&gt;. If you specify the namespace or database name, you must provide the schema name, even if the schema is &lt;code&gt;public&lt;/code&gt;.
&lt;p&gt;If you specify a schema name that contains a period, the part before the period cannot be the same as the name of an existing namespace.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;table-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The target table. You cannot invoke &lt;span class=&#34;sql&#34;&gt;INSERT&lt;/span&gt; on a projection.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;column-list&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of one or more target columns in this table, listed in any order. &lt;span class=&#34;sql&#34;&gt;VALUES&lt;/span&gt; clause values are mapped to columns in the same order. If you omit this list, the database maps &lt;span class=&#34;sql&#34;&gt;VALUES&lt;/span&gt; clause values to columns according to column order in the table definition.
&lt;p&gt;A list of target columns is invalid with &lt;span class=&#34;sql&#34;&gt;DEFAULT VALUES&lt;/span&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;DEFAULT VALUES&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Fills all columns with their default values as specified in the table definition. If no default value is specified for a column, the database inserts a &lt;span class=&#34;sql&#34;&gt;NULL&lt;/span&gt; value.
&lt;p&gt;You cannot specify a list of target columns with this option.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;VALUES (&lt;/code&gt;&lt;em&gt;&lt;code&gt;values-list&lt;/code&gt;&lt;/em&gt;&lt;code&gt;)&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of one or more values to insert in the target columns, where each value is one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;expression&lt;/code&gt;&lt;/em&gt; resolves to a value to insert in the target column. The expression must not nest other expressions, include database meta-functions, or use mixed complex types. Values may include native array or ROW types if the database can coerce the element or field types.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;DEFAULT&lt;/span&gt; inserts the default value as specified in the table definition.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If no value is supplied for a column, the database implicitly adds a &lt;span class=&#34;sql&#34;&gt;DEFAULT&lt;/span&gt; value, if defined. Otherwise the database inserts a &lt;span class=&#34;sql&#34;&gt;NULL&lt;/span&gt; value. If the column is defined as &lt;span class=&#34;sql&#34;&gt;NOT NULL&lt;/span&gt;, &lt;span class=&#34;sql&#34;&gt;INSERT&lt;/span&gt; returns an error.&lt;/p&gt;
&lt;p&gt;You can use INSERT to insert multiple rows in the target table, by specifying multiple comma-delimited VALUES lists:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;INSERT INTO &lt;span class=&#34;code-variable&#34;&gt;table-name&lt;/span&gt;
   VALUES ( &lt;span class=&#34;code-variable&#34;&gt;values-list&lt;/span&gt; ), ( &lt;span class=&#34;code-variable&#34;&gt;values-list&lt;/span&gt; )[,...]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For details, see &lt;a href=&#34;#Multi-Ro&#34;&gt;Multi-Row INSERT&lt;/a&gt; below.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;a name=&#34;InsertSelect&#34;&gt;&lt;/a&gt;&lt;code&gt;SELECT &lt;/code&gt;&lt;em&gt;&lt;code&gt;query-expression&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A query that returns the rows to insert. Isolation level applies only to the &lt;span class=&#34;sql&#34;&gt;SELECT&lt;/span&gt; clauses and works like any query. Restrictions on use of &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/&#34;&gt;complex types&lt;/a&gt; apply as in other queries.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Table owner or user with GRANT OPTION is grantor&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;INSERT privilege on table&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;USAGE privilege on schema that contains the table&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;committing-successive-table-changes&#34;&gt;Committing successive table changes&lt;/h2&gt;
&lt;p&gt;OpenText™ Analytics Database follows the SQL-92 transaction model, so successive INSERT, UPDATE, and DELETE statements are included in the same transaction. You do not need to explicitly start this transaction; however, you must explicitly end it with &lt;a href=&#34;../../../en/sql-reference/statements/commit/#&#34;&gt;COMMIT&lt;/a&gt;, or implicitly end it with &lt;a href=&#34;../../../en/sql-reference/statements/copy/#&#34;&gt;COPY&lt;/a&gt;. Otherwise, the database discards all changes that were made within the transaction.&lt;/p&gt;

&lt;p&gt;&lt;a name=&#34;Multi-Ro&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;multi-row-insert&#34;&gt;Multi-row INSERT&lt;/h2&gt;
&lt;p&gt;You can use INSERT to insert multiple rows in the target table, by specifying multiple comma-delimited VALUES lists. For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;varchar&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;un, deux&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;trois, quatre&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;OUTPUT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;COMMIT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;COMMIT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;       &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---+---+---------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;un&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;deux&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;trois&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;quatre&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;rows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;restrictions&#34;&gt;Restrictions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The database does not support subqueries as the target of an &lt;span class=&#34;sql&#34;&gt;INSERT&lt;/span&gt; statement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restrictions on the use of &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/&#34;&gt;complex types&lt;/a&gt; in &lt;span class=&#34;sql&#34;&gt;SELECT&lt;/span&gt; statements apply equally to &lt;span class=&#34;sql&#34;&gt;INSERT&lt;/span&gt;. Using complex values that cannot be coerced to the column type results in an error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If primary key, unique key, or check constraints are enabled for automatic enforcement in the target table, the database enforces those constraints when you load new data. If a violation occurs, the database rolls back the operation and returns an error.&lt;/p&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If an insert would violate a table or schema disk quota, the operation fails. For more information, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/disk-quotas/#&#34;&gt;Disk quotas&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;101&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;102&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;103&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;104&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;customer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;male&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;DPR&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;MA&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;35&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;start_time&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;film&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;05:10:00:01&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;retail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;C0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;C1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1001&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;films&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;tmp_films&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WHERE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;date_prod&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;2004-05-07&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The database does not support subqueries or nested expressions as the target of an &lt;span class=&#34;sql&#34;&gt;INSERT&lt;/span&gt; statement. For example, the following query returns an error message:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;abc&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mycolumn&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mytable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ERROR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4821&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Subqueries&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;not&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;allowed&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;insert&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can rewrite the above query as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;col2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;abc&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mycolumn&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mytable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;OUTPUT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example shows how to use &lt;span class=&#34;sql&#34;&gt;INSERT...VALUES&lt;/span&gt; with flex tables:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FLEX&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flex1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flex1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;x&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;OUTPUT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MapToString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;__raw__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flex1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;           &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MapToString&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;a&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;b&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example shows how to use &lt;span class=&#34;sql&#34;&gt;INSERT...SELECT&lt;/span&gt; with flex tables:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FLEX&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flex2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flex2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;2016-08-10 11:10&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Hello&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;d&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1415&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;from&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flex1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;OUTPUT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MapToString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;__raw__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flex2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;           &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MapToString&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;a&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;b&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;c&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;2016-08-10&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;d&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Hello&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;e&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1415&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;f&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following examples use complex types:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;inventory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;storeID&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;INT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;product&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ROW&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;VARCHAR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;code&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;VARCHAR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--- LookUpProducts() returns a row(varchar, int), which is cast to row(varchar, varchar):
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;inventory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;product&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LookUpProducts&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;OUTPUT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--- Cannot use with select...values:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;inventory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;product&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LookUpProducts&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ERROR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2631&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;product&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;is&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;row(varchar,varchar)&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;but&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;expression&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;is&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;row(varchar,int)&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--- Literal values are supported:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;inventory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;product&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;VALUES&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ROW&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;xbox&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;165&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;OUTPUT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;product&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;inventory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;product&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;xbox&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;code&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;125&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: LOCK TABLE</title>
      <link>/en/sql-reference/statements/lock-table/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/lock-table/</guid>
      <description>
        
        
        &lt;p&gt;&lt;a href=&#34;../../../en/admin/db-locks/&#34;&gt;Locks&lt;/a&gt; a table, giving the caller&#39;s session &lt;a href=&#34;../../../en/admin/db-locks/lock-modes/&#34;&gt;exclusive access&lt;/a&gt; to certain operations. Tables are automatically unlocked after the current transaction ends—that is, after &lt;a href=&#34;../../../en/sql-reference/statements/commit/#&#34;&gt;COMMIT&lt;/a&gt; or &lt;a href=&#34;../../../en/sql-reference/statements/rollback/#&#34;&gt;ROLLBACK&lt;/a&gt;. LOCK TABLE can be useful for &lt;a href=&#34;../../../en/admin/db-locks/deadlocks/&#34;&gt;preventing deadlocks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To view existing locks, see &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/locks/#&#34;&gt;LOCKS&lt;/a&gt;.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;&lt;a href=&#34;../../../en/admin/transactions/read-committed-isolation/#&#34;&gt;READ COMMITTED isolation&lt;/a&gt; (default) and &lt;a href=&#34;../../../en/admin/transactions/serializable-isolation/#&#34;&gt;SERIALIZABLE isolation&lt;/a&gt; automatically handle locks for you, and the vast majority of users can rely on them exclusively; LOCK TABLE is only for advanced users who need granular control over locks for more complex workloads.&lt;/p&gt;
&lt;p&gt;To implement pessimistic concurrency without manually locking tables, you can use &lt;a href=&#34;../../../en/sql-reference/statements/select/&#34;&gt;SELECT...FOR UPDATE&lt;/a&gt; to acquire an EXCLUSIVE (X) lock on the table.&lt;/p&gt;


&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;LOCK [ TABLE ] [[{&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt; }.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;table&lt;/span&gt; [,...]
    IN { &lt;span class=&#34;code-variable&#34;&gt;lock_type&lt;/span&gt; } MODE
    [ NOWAIT ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;{ &lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt; &lt;code&gt;|&lt;/code&gt; &lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the database or &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; that contains &lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Database name: If specified, it must be the current database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Namespace name (Eon Mode only): You must specify the namespace of objects in non-default namespaces. If no namespace is provided, it is assumed the object is in the default namespace.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the schema, by default &lt;code&gt;public&lt;/code&gt;. If you specify the namespace or database name, you must provide the schema name, even if the schema is &lt;code&gt;public&lt;/code&gt;.
&lt;p&gt;If you specify a schema name that contains a period, the part before the period cannot be the same as the name of an existing namespace.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table to lock.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;lock-type&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The &lt;a href=&#34;../../../en/admin/db-locks/lock-modes/&#34;&gt;type of lock&lt;/a&gt;, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;SHARE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;INSERT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;INSERT VALIDATE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SHARE INSERT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EXCLUSIVE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NOT DELETE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;USAGE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OWNER&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

LOCK TABLE does not currently support D (drop partition) locks.

&lt;/div&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;NOWAIT&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;If specified, LOCK TABLE returns and reports an error immediately if it cannot acquire the lock. Otherwise, LOCK TABLE waits for incompatible locks to be released by their respective sessions, returning an error if the lock is not released after a certain amount of time, as defined by &lt;a href=&#34;../../../en/sql-reference/config-parameters/general-parameters/&#34;&gt;LockTimeout&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Required &lt;a href=&#34;../../../en/sql-reference/statements/grant-statements/grant-table/&#34;&gt;privileges&lt;/a&gt; depend on the type of lock requested:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
Lock&lt;/th&gt; 

&lt;th &gt;
Privileges&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
SHARED (S)&lt;/td&gt; 

&lt;td &gt;
SELECT&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
INSERT (I)&lt;/td&gt; 

&lt;td &gt;
INSERT&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
SHARE INSERT&lt;/td&gt; 

&lt;td &gt;
SELECT, INSERT&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
INSERT VALIDATE (IV)&lt;/td&gt; 

&lt;td &gt;
SELECT, INSERT&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
EXCLUSIVE (X)&lt;/td&gt; 

&lt;td &gt;
UPDATE, DELETE&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
NOT DELETE (T)&lt;/td&gt; 

&lt;td &gt;
SELECT&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
USAGE&lt;/td&gt; 

&lt;td &gt;
All privileges&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Owner&lt;/td&gt; 

&lt;td &gt;
All privileges&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/db-locks/lock-examples/#&#34;&gt;Lock examples&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: MERGE</title>
      <link>/en/sql-reference/statements/merge/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/merge/</guid>
      <description>
        
        
        &lt;p&gt;Performs update and insert operations on a target table based on the results of a join with another data set, such as a table or view. The join can match a source row with only one target row; otherwise, OpenText™ Analytics Database returns an error.&lt;/p&gt;
&lt;p&gt;If a merge would violate a table or schema disk quota, the operation fails. For more information, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/disk-quotas/#&#34;&gt;Disk quotas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The target table cannot have columns of complex data types. The source table can, so long as those columns are not included in the merge operation.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;MERGE [ /*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/ ]
    INTO [[ { &lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt; }.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;target-table&lt;/span&gt; [ [AS] &lt;span class=&#34;code-variable&#34;&gt;alias &lt;/span&gt;]
    USING &lt;span class=&#34;code-variable&#34;&gt;source-dataset&lt;/span&gt;
    ON &lt;span class=&#34;code-variable&#34;&gt;join-condition&lt;/span&gt; &lt;span class=&#34;code-variable&#34;&gt;matching-clause&lt;/span&gt;[ &lt;span class=&#34;code-variable&#34;&gt;matching-clause&lt;/span&gt; ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;Number of target table rows updated or inserted&lt;/p&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/label/#&#34;&gt;LABEL&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Assigns a label to a statement to identify it for profiling and debugging.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;{ &lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt; &lt;code&gt;|&lt;/code&gt; &lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the database or &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; that contains &lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Database name: If specified, it must be the current database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Namespace name (Eon Mode only): You must specify the namespace of objects in non-default namespaces. If no namespace is provided, it is assumed the object is in the default namespace.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the schema, by default &lt;code&gt;public&lt;/code&gt;. If you specify the namespace or database name, you must provide the schema name, even if the schema is &lt;code&gt;public&lt;/code&gt;.
&lt;p&gt;If you specify a schema name that contains a period, the part before the period cannot be the same as the name of an existing namespace.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table on which to perform update and insert operations. &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; takes an X (exclusive) lock on the target table during the operation. The table must not contain columns of complex types.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
The total number of target table columns cannot exceed 831.
&lt;/div&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;source-dataset&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The data to join to &lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt;, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;[[&lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema.&lt;/code&gt;&lt;/em&gt;&lt;code&gt;]&lt;/code&gt;&lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;&lt;code&gt;[ [AS]&lt;/code&gt;&lt;em&gt;&lt;code&gt;alias&lt;/code&gt;&lt;/em&gt;&lt;code&gt; ]&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;[[&lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema.&lt;/code&gt;&lt;/em&gt;&lt;code&gt;]&lt;/code&gt;&lt;em&gt;&lt;code&gt;view&lt;/code&gt;&lt;/em&gt;&lt;code&gt;[ [AS]&lt;/code&gt;&lt;em&gt;&lt;code&gt;alias&lt;/code&gt;&lt;/em&gt;&lt;code&gt; ]&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;(&lt;/code&gt;&lt;em&gt;&lt;code&gt;subquery&lt;/code&gt;&lt;/em&gt;&lt;code&gt;) &lt;/code&gt;&lt;em&gt;&lt;code&gt;sq-alias&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The specified data set typically supplies the data used to update the target table and populate new rows. You can specify an external table.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ON &lt;/code&gt;&lt;em&gt;&lt;code&gt;join-condition&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The conditions on which to join the target table and source data set.

&lt;div class=&#34;alert admonition tip&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Tip&lt;/h4&gt;

The database query optimizer can create an optimized query plan for a &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; statement only if the target table join column has a unique or primary key constraint. For details, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/merge-optimization/#&#34;&gt;MERGE optimization&lt;/a&gt;.

&lt;/div&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;matching-clause&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;One of the following clauses:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;&lt;a href=&#34;#WhenMatched&#34;&gt;WHEN MATCHED THEN UPDATE&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;&lt;a href=&#34;#WhenNotMatched&#34;&gt;WHEN NOT MATCHED THEN INSERT&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; supports one instance of each clause, and must include at least one.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a name=&#34;WhenMatched&#34;&gt;&lt;/a&gt;WHEN MATCHED THEN UPDATE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;For each &lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt; row that is joined (matched) to &lt;em&gt;&lt;code&gt;source-dataset&lt;/code&gt;&lt;/em&gt;, specifies to update one or more columns:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;WHEN MATCHED [ AND &lt;span class=&#34;code-variable&#34;&gt;update-filter&lt;/span&gt; ] THEN UPDATE
  SET { &lt;span class=&#34;code-variable&#34;&gt;column&lt;/span&gt; = &lt;span class=&#34;code-variable&#34;&gt;expression&lt;/span&gt; }[,...]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;&lt;code&gt;update-filter&lt;/code&gt;&lt;/em&gt; optionally filters the set of matching rows. The update filter can specify any number of conditions. the database evaluates each matching row against this filter, and updates only the rows that evaluate to true. For details, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/update-and-insert-filters/#&#34;&gt;Update and insert filters&lt;/a&gt;.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;The database also supports Oracle syntax for specifying update filters:&lt;/p&gt;
&lt;pre class=&#34;table-pre&#34;&gt;&lt;p&gt;WHEN MATCHED THEN UPDATE
SET { &lt;span class=&#34;code-variable&#34;&gt;column&lt;/span&gt; = &lt;span class=&#34;code-variable&#34;&gt;expression&lt;/span&gt; }[,...]
[ WHERE &lt;span class=&#34;code-variable&#34;&gt;update-filter &lt;/span&gt;]&lt;/p&gt;
&lt;/pre&gt;


&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The following requirements apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; statement can contain only one &lt;span class=&#34;sql&#34;&gt;WHEN MATCHED&lt;/span&gt; clause.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;target-column&lt;/code&gt;&lt;/em&gt; can only specify a column name in the target table. It cannot be qualified with a table name.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/#&#34;&gt;Merging table data&lt;/a&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a name=&#34;WhenNotMatched&#34;&gt;&lt;/a&gt;WHEN NOT MATCHED THEN INSERT&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;For each &lt;em&gt;&lt;code&gt;source-dataset&lt;/code&gt;&lt;/em&gt; row that is not joined (not matched) to &lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt;, specifies to:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Insert a new row into &lt;em&gt;&lt;code&gt;target-table&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Populate each new row with the values specified in &lt;em&gt;&lt;code&gt;values-list&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;WHEN NOT MATCHED [ AND &lt;span class=&#34;code-variable&#34;&gt;insert-filter&lt;/span&gt; ] THEN INSERT
  [ ( &lt;span class=&#34;code-variable&#34;&gt;column-list&lt;/span&gt; ) ] VALUES ( &lt;span class=&#34;code-variable&#34;&gt;values-list&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;&lt;code&gt;column-list&lt;/code&gt;&lt;/em&gt; is a comma-delimited list of one or more target columns in the target table, listed in any order. &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; maps &lt;em&gt;&lt;code&gt;column-list&lt;/code&gt;&lt;/em&gt; columns to &lt;em&gt;&lt;code&gt;values-list&lt;/code&gt;&lt;/em&gt; values in the same order, and each column-value pair must be &lt;a href=&#34;../../../en/sql-reference/data-types/data-type-coercion/&#34;&gt;compatible&lt;/a&gt;. If you omit &lt;em&gt;&lt;code&gt;column-list&lt;/code&gt;&lt;/em&gt;, the database maps &lt;em&gt;&lt;code&gt;values-list&lt;/code&gt;&lt;/em&gt; values to columns according to column order in the table definition.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;insert-filter&lt;/code&gt;&lt;/em&gt; optionally filters the set of non-matching rows. The insert filter can specify any number of conditions. The database evaluates each non-matching source row against this filter. For each row that evaluates to true, the database inserts a new row in the target table. For details, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/update-and-insert-filters/#&#34;&gt;Update and insert filters&lt;/a&gt;.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;The database also supports Oracle syntax for specifying insert filters:&lt;/p&gt;
&lt;pre class=&#34;table-pre&#34;&gt;&lt;p&gt;WHEN NOT MATCHED THEN INSERT
[ ( &lt;span class=&#34;code-variable&#34;&gt;column-list&lt;/span&gt; ) ] VALUES ( &lt;span class=&#34;code-variable&#34;&gt;values-list&lt;/span&gt; )
[ WHERE &lt;span class=&#34;code-variable&#34;&gt;insert-filter &lt;/span&gt;]&lt;/p&gt;
&lt;/pre&gt;


&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The following requirements apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; statement can contain only one &lt;span class=&#34;sql&#34;&gt;WHEN NOT MATCHED&lt;/span&gt; clause.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;*&lt;/code&gt;column-list&lt;code&gt;*&lt;/code&gt;&lt;/em&gt; can only specify column names in the target table. It cannot be qualified with a table name.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Insert filter conditions can only reference the source data. If any condition references the target table, the database returns an error.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/#&#34;&gt;Merging table data&lt;/a&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; requires the following privileges:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;SELECT&lt;/span&gt; permissions on the source data and &lt;span class=&#34;sql&#34;&gt;INSERT&lt;/span&gt;, &lt;span class=&#34;sql&#34;&gt;UPDATE&lt;/span&gt;, and &lt;span class=&#34;sql&#34;&gt;DELETE&lt;/span&gt; permissions on the target table.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automatic constraint enforcement requires &lt;span class=&#34;sql&#34;&gt;SELECT&lt;/span&gt; permissions on the table containing the constraint.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;SELECT&lt;/span&gt; permissions on the target table if the condition in the syntax reads data from the target table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, the following &lt;span class=&#34;sql&#34;&gt;GRANT&lt;/span&gt; statement grants &lt;code&gt;user1&lt;/code&gt; access to the &lt;code&gt;t2&lt;/code&gt; table. This allows &lt;code&gt;user1&lt;/code&gt; to run the &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; statement that follows:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE t2 to user1;
GRANT PRIVILEGE

=&amp;gt;\c - user1
You are now connected as user &amp;#34;user1&amp;#34;.

=&amp;gt; MERGE INTO t2 USING t1 ON t1.a = t2.a
WHEN MATCHED THEN UPDATE SET b = t1.b
WHEN NOT MATCHED THEN INSERT (a, b) VALUES (t1.a, t1.b);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a name=&#34;WhenMatched&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;a-nameupdateinsertfiltersaimproving-merge-performance&#34;&gt;&lt;a name=&#34;UpdateInsertFilters&#34;&gt;&lt;/a&gt;Improving MERGE performance&lt;/h2&gt;
&lt;p&gt;You can improve &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; performance in several ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/merge-optimization/#Projecti&#34;&gt;Design projections for optimal MERGE performance&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/merge-optimization/#Requirem&#34;&gt;Facilitate creation of optimized query plans&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use a source data set that is smaller than the target table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, see &lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/merge-optimization/#&#34;&gt;MERGE optimization&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;constraint-enforcement&#34;&gt;Constraint enforcement&lt;/h2&gt;
&lt;p&gt;If primary key, unique key, or check constraints are enabled for automatic enforcement in the target table, the database enforces those constraints when you load new data. If a violation occurs, the database rolls back the operation and returns an error.

&lt;div class=&#34;admonition caution&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Caution&lt;/h4&gt;

If you run &lt;span class=&#34;sql&#34;&gt;MERGE&lt;/span&gt; multiple times using the same target and source table, each iteration is liable to introduce duplicate values into the target columns and return with an error.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;columns-prohibited-from-merge&#34;&gt;Columns prohibited from merge&lt;/h2&gt;
&lt;p&gt;The following columns cannot be specified in a merge operation; attempts to do so return with an error:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/admin/working-with-native-tables/sequences/identity-sequences/&#34;&gt;IDENTITY&lt;/a&gt; columns, or columns whose default value is set to a &lt;a href=&#34;../../../en/admin/working-with-native-tables/sequences/named-sequences/creating-and-using-named-sequences/&#34;&gt;named sequence&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vmap columns such as &lt;code&gt;__raw__&lt;/code&gt; in flex tables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Columns of complex types ARRAY, SET, or ROW.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/basic-merge-example/#&#34;&gt;Basic MERGE example&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/merge-source-options/#&#34;&gt;MERGE source options&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/merge-matching-clauses/#&#34;&gt;MERGE matching clauses&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/update-and-insert-filters/#&#34;&gt;Update and insert filters&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/admin/working-with-native-tables/merging-table-data/#&#34;&gt;Merging table data&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: PROFILE</title>
      <link>/en/sql-reference/statements/profile/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/profile/</guid>
      <description>
        
        
        &lt;p&gt;Profiles a single SQL statement.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;PROFILE { &lt;span class=&#34;code-variable&#34;&gt;sql-statement&lt;/span&gt; }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;sql-statement&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A query (&lt;code&gt;SELECT&lt;/code&gt;) statement or DML statement--for example, you can profile 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/insert/#&#34;&gt;INSERT&lt;/a&gt;&lt;/code&gt;, 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/update/#&#34;&gt;UPDATE&lt;/a&gt;&lt;/code&gt;, 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/copy/#&#34;&gt;COPY&lt;/a&gt;&lt;/code&gt;, and 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/statements/merge/#&#34;&gt;MERGE&lt;/a&gt;&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;output&#34;&gt;Output&lt;/h2&gt;
&lt;p&gt;Writes profile summary to stderr, saves details to system catalog 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/execution-engine-profiles/#&#34;&gt;V_MONITOR.EXECUTION_ENGINE_PROFILES&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;The same privileges required to run the profiled statement&lt;/p&gt;
&lt;h2 id=&#34;description&#34;&gt;Description&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;PROFILE&lt;/code&gt; generates detailed information about how the target statement executes, and saves that information in the system catalog 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/execution-engine-profiles/#&#34;&gt;V_MONITOR.EXECUTION_ENGINE_PROFILES&lt;/a&gt;&lt;/code&gt;. Query output is preceded by a profile summary: profile identifiers &lt;code&gt;transaction_id&lt;/code&gt; and &lt;code&gt;statement_id&lt;/code&gt;, initiator memory for the query, and total memory required. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; PROFILE SELECT customer_name, annual_income FROM public.customer_dimension WHERE (customer_gender, annual_income) IN (SELECT customer_gender, MAX(annual_income) FROM public.customer_dimension GROUP BY customer_gender);
NOTICE 4788:  Statement is being profiled
HINT:  Select * from v_monitor.execution_engine_profiles where transaction_id=45035996274683334 and statement_id=7;
NOTICE 3557:  Initiator memory for query: [on pool general: 708421 KB, minimum: 554324 KB]
NOTICE 5077:  Total memory required by query: [708421 KB]
  customer_name   | annual_income
------------------+---------------
 Emily G. Vogel   |        999998
 James M. McNulty |        999979
(2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Use profile identifiers to query the table for profile information on a given query.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../en/admin/profiling-db-performance/profiling-single-statements/#&#34;&gt;Profiling single statements&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: RELEASE SAVEPOINT</title>
      <link>/en/sql-reference/statements/release-savepoint/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/release-savepoint/</guid>
      <description>
        
        
        &lt;p&gt;Destroys a savepoint without undoing the effects of commands executed after the savepoint was established.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RELEASE [ SAVEPOINT ] &lt;span class=&#34;code-variable&#34;&gt;savepoint_name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;savepoint_name&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the name of the savepoint to destroy.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;p&gt;Once destroyed, the savepoint is unavailable as a rollback point.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example establishes and then destroys a savepoint called my_savepoint. The values 101 and 102 are both inserted at commit.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; INSERT INTO product_key VALUES (101);
=&amp;gt; SAVEPOINT my_savepoint;
=&amp;gt; INSERT INTO product_key VALUES (102);
=&amp;gt; RELEASE SAVEPOINT my_savepoint;
=&amp;gt; COMMIT;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/savepoint/#&#34;&gt;SAVEPOINT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/rollback-to-savepoint/#&#34;&gt;ROLLBACK TO SAVEPOINT&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: REMOVE RESTORE POINT FROM ARCHIVE</title>
      <link>/en/sql-reference/statements/remove-restore-point/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/remove-restore-point/</guid>
      <description>
        
        
        &lt;p&gt;&lt;strong&gt;Eon Mode only&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Removes a &lt;a href=&#34;../../../en/eon/revive-eon-db/in-db-restore-points/&#34;&gt;in-database restore point&lt;/a&gt; from an &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-archive/&#34;&gt;archive&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To remove a specific restore point, you must specify either its index in the archive or its unique object ID. You can find both of these identifiers by querying the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/archive-restore-points/#&#34;&gt;ARCHIVE_RESTORE_POINTS&lt;/a&gt; system table. If neither of these identifiers are provided, the oldest restore point in the archive is removed.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;REMOVE RESTORE POINT FROM ARCHIVE &lt;span class=&#34;code-variable&#34;&gt;archive-name&lt;/span&gt; { INDEX &lt;span class=&#34;code-variable&#34;&gt;restore-point-index&lt;/span&gt; | ID &lt;span class=&#34;code-variable&#34;&gt;restore-point-id&lt;/span&gt; }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;archive-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the archive from which to remove the restore point.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;restore-point-index&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Index of the restore point to remove, where index 1 specifies the most recently saved restore point.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;restore-point-id&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Unique object ID of the restore point to remove.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Superuser or archive owner&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;To view all restore points, including unique object IDs and indexes, query the ARCHIVE_RESTORE_POINTS system table:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARCHIVE_RESTORE_POINTS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;                  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;save_time&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;index&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;archive&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------------------------------------+----------------------------+-------+-----------+----------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2616&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;f6cd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e98c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;472&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;d5c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a7f459dff82b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2021&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;58&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;565311&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;COMPLETE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;116066&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cc&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cb&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ce5&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;9&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a27&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;170538&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ba95cf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2021&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;06&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;02&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;48&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;059941&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;COMPLETE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;rows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following statement removes the most recently saved restore point in the &lt;code&gt;verticadb&lt;/code&gt; archive:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REMOVE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RESTORE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;POINT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARCHIVE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;index&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REMOVE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RESTORE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;POINT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you again query the ARCHIVE_RESTORE_POINTS table, the restore point will either appear with a status of REMOVING or, if the removal process has completed, is not listed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARCHIVE_RESTORE_POINTS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;                  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;save_time&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;index&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;archive&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------------------------------------+----------------------------+-------+-----------+----------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2616&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;f6cd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e98c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;472&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;d5c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a7f459dff82b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2021&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;58&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;565311&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;       &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REMOVING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;116066&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cc&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cb&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ce5&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;9&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a27&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;170538&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ba95cf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2021&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;06&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;02&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;48&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;059941&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;COMPLETE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;rows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-archive/#&#34;&gt;CREATE ARCHIVE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/drop-statements/drop-archive/#&#34;&gt;DROP ARCHIVE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/save-restore-point/#&#34;&gt;SAVE RESTORE POINT TO ARCHIVE&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: REPLICATE</title>
      <link>/en/sql-reference/statements/replicate/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/replicate/</guid>
      <description>
        
        
        &lt;p&gt;&lt;strong&gt;Eon Mode only&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Copies table or schema data directly from one Eon Mode database&#39;s communal storage to another. &lt;span class=&#34;sql&#34;&gt;REPLICATE &lt;/span&gt; copies all table data and metadata. Each REPLICATE call can only replicate tables and schemas to a single &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; in the target database. When called multiple times, this statement only copies data that has changed in the source database since the last call. The tables do not have to exist in the target database before replication. If the table does exist in the target, it is overwritten.&lt;/p&gt;

&lt;div class=&#34;admonition caution&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Caution&lt;/h4&gt;

&lt;p&gt;Replication overwrites any data in the target table. You do not receive any notification that the data in the target database will be overwritten, even if the target table&#39;s design does not match the source table. Verify that the tables you want to replicate either do not exist in the target database or do not contain data that you need. Be especially cautious when replicating entire schemas to prevent overwriting data in the target database.&lt;/p&gt;
&lt;p&gt;Similarly, changes to a replicated table in the target database are overwritten each time you replicate the table. When performing scheduled replications, only grant read access to replicated tables in the target database. Limiting these tables to read-only access will help prevent confusion if a user makes changes to a replicated table.&lt;/p&gt;


&lt;/div&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;REPLICATE { &lt;span class=&#34;code-variable&#34;&gt;table&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt; | &amp;#34;[.&lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.&lt;span class=&#34;code-variable&#34;&gt;table&lt;/span&gt;&amp;#34; 
          |  INCLUDE &amp;#34;&lt;span class=&#34;code-variable&#34;&gt;inc_pattern&lt;/span&gt;&amp;#34; [ EXCLUDE &amp;#34;&lt;span class=&#34;code-variable&#34;&gt;ex_pattern&lt;/span&gt;&amp;#34; ] }
          { FROM | TO } &lt;span class=&#34;code-variable&#34;&gt;database_name&lt;/span&gt;
          [ TARGET_NAMESPACE &lt;span class=&#34;code-variable&#34;&gt;namespace-name&lt;/span&gt; ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;&lt;code&gt; | &lt;/code&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;code&gt; |  &amp;quot;[.&lt;/code&gt;&lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.&lt;/code&gt;&lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;&lt;code&gt;&amp;quot;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The name of a single table or schema to replicate. If specified, the namespace name must be front-qualified with a period. For example, to specify table &lt;code&gt;t&lt;/code&gt; in schema &lt;code&gt;s&lt;/code&gt; in namespace &lt;code&gt;n&lt;/code&gt;, you would write &amp;quot;.n.s.t&amp;quot;. If you do not specify a namespace, the object is assumed to be in the &lt;code&gt;default_namespace&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;inc_pattern&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A string containing a wildcard pattern of the schemas and/or tables to include in the replication. Namespace names must be front-qualified with a period.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;ex_pattern&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A string containing a wildcard pattern of the schemas and/or tables to exclude from the set of tables matched by the include pattern. Namespace names must be front-qualified with a period.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;When using wildcard patterns, be sure to anchor the patterns with a period to indicate the separation between the schema and the table name and between the namespace and schema. For example, suppose you wanted to replicate all tables in the &lt;code&gt;public&lt;/code&gt; schema in the &lt;code&gt;n1&lt;/code&gt; namespace that started with the letter &lt;code&gt;t&lt;/code&gt;, except the table &lt;code&gt;public.t3&lt;/code&gt;. This pattern statement does not work because the exclude wildcard only applies to schemas:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  REPLICATE INCLUDE &amp;#34;.n1.public.t*&amp;#34; EXCLUDE &amp;#34;*3&amp;#34; FROM verticadb;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following statement does work because the periods in the &lt;span class=&#34;sql&#34;&gt;EXCLUDE&lt;/span&gt; wildcard force the wildcard to apply to the table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  REPLICATE INCLUDE &amp;#34;.n1.public.t*&amp;#34; EXCLUDE &amp;#34;.n1.*.*3&amp;#34; FROM verticadb;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;database_name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the database from or to which data is replicated. The replication steps depend on whether the call is initiated from the source or target database:
&lt;ul&gt;
&lt;li&gt;Target-inititated replication: use the &lt;a href=&#34;../../../en/sql-reference/statements/connect-to/#&#34;&gt;CONNECT TO VERTICA&lt;/a&gt; statement to create a connection to the source database, and specify the source database in the REPLICATE statement using a &lt;code&gt;FROM&lt;/code&gt; &lt;em&gt;&lt;code&gt;source_db&lt;/code&gt;&lt;/em&gt; clause.&lt;/li&gt;
&lt;li&gt;Source-inititated replication: use the &lt;span class=&#34;sql&#34;&gt;CONNECT TO VERTICA&lt;/span&gt; statement to connect to the target database, and specify the target database in the REPLICATE statement using a &lt;code&gt;TO&lt;/code&gt; &lt;em&gt;&lt;code&gt;target_db&lt;/code&gt;&lt;/em&gt; clause.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both of these methods copy the shard data directly from the source communal storage location to the target communal storage location.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;TARGET_NAMESPACE &lt;/code&gt;&lt;em&gt;&lt;code&gt;namespace-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Namespace in the target cluster to which objects are replicated. The target namespace must have the same shard count as the source namespace in the source cluster.
&lt;p&gt;If you do not specify a target namespace, objects are replicated to a namespace with the same name as the source namespace. If no such namespace exists in the target cluster, it is created with the same name and shard count as the source namespace. You can only replicate tables in the &lt;code&gt;public&lt;/code&gt; schema to the &lt;code&gt;default_namespace&lt;/code&gt; in the target cluster.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Superuser&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Connect to the source database from the target database and then replicate the source database&#39;s &lt;code&gt;customers&lt;/code&gt; table to the target database:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CONNECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VERTICA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;source_db&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dbadmin&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;           &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PASSWORD&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;mypassword&lt;/span&gt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;vertica_node01&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5433&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CONNECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;customers&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;source_db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The following example performs the same data replication as the previous example, but the following replication is initiated from the source database instead of the target database:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CONNECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VERTICA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;target_db&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dbadmin&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;           &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PASSWORD&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;mypassword&lt;/span&gt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ON&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;vertica_node01&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5433&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CONNECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;customers&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;target_db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Replicate all tables in the &lt;code&gt;public&lt;/code&gt; schema that start with the letter t:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;INCLUDE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;public.t*&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;source_db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Replicate all tables in the &lt;code&gt;public&lt;/code&gt; schema except those that start with the string &lt;code&gt;customer_&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;INCLUDE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;public.*&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EXCLUDE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;*.customer_*&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;source_db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Replicate the &lt;code&gt;flights&lt;/code&gt; table in the &lt;code&gt;airline&lt;/code&gt; schema of the &lt;code&gt;airport&lt;/code&gt; namespace to the &lt;code&gt;airport2&lt;/code&gt; namespace in the target cluster:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;.airport.airline.flights&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;source_db&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TARGET_NAMESPACE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;airport2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replicate all schemas and tables in the &lt;code&gt;default_namespace&lt;/code&gt; of the source database to the &lt;code&gt;default_namespace&lt;/code&gt; in the target database:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;REPLICATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;INCLUDE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;.default_namespace.*.*&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;source_db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;



&lt;ul&gt;
	
	&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/replication-status/&#34;&gt;REPLICATION_STATUS&lt;/a&gt;&lt;/li&gt;
	
	&lt;li&gt;&lt;a href=&#34;../../../en/data-export/replication/server-based-replication/&#34;&gt;Server-based replication&lt;/a&gt;&lt;/li&gt;
	
&lt;/ul&gt;



      </description>
    </item>
    
    <item>
      <title>Sql-Reference: REVOKE statements</title>
      <link>/en/sql-reference/statements/revoke-statements/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/revoke-statements/</guid>
      <description>
        
        
        &lt;p&gt;REVOKE statements let you revoke privileges on database objects from &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-users/&#34;&gt;users&lt;/a&gt; and &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-roles/&#34;&gt;roles&lt;/a&gt;.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
In a database with trust authentication, REVOKE statements appear to work as expected but have no real effect on database security.
&lt;/div&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ROLLBACK</title>
      <link>/en/sql-reference/statements/rollback/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/rollback/</guid>
      <description>
        
        
        &lt;p&gt;Ends the current transaction and discards all changes that occurred during the transaction.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ROLLBACK [ WORK | TRANSACTION ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;WORK | TRANSACTION &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Have no effect; they are optional keywords for readability.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;p&gt;When an operation is rolled back, any locks that are acquired by the operation are also rolled back.&lt;/p&gt;
&lt;p&gt;ABORT is a synonym for ROLLBACK.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example shows how to roll back from a DELETE transaction.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM sample_table;
a
---
1
(1 row)

=&amp;gt; DELETE FROM sample_table WHERE a = 1;

=&amp;gt; SELECT * FROM sample_table;
a
---
(0 rows)
=&amp;gt; ROLLBACK;
=&amp;gt; SELECT * FROM sample_table;
a
---
1
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This example shows how to roll back the changes you made since the BEGIN statement.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED READ ONLY;
BEGIN
=&amp;gt; ROLLBACK TRANSACTION;
ROLLBACK
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/transactions/#&#34;&gt;Transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/connecting-to/client-libraries/accessing/c/querying-db-using-ado-net/inserting-data-ado-net/creating-and-rolling-back-transactions/#&#34;&gt;Creating and rolling back transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/begin/#&#34;&gt;BEGIN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/commit/#&#34;&gt;COMMIT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/end/#&#34;&gt;END&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/start-transaction/#&#34;&gt;START TRANSACTION&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ROLLBACK TO SAVEPOINT</title>
      <link>/en/sql-reference/statements/rollback-to-savepoint/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/rollback-to-savepoint/</guid>
      <description>
        
        
        &lt;p&gt;Rolls back all commands that have been entered within the transaction since the given savepoint was established.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ROLLBACK TO [SAVEPOINT] &lt;span class=&#34;code-variable&#34;&gt;savepoint_name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;savepoint_name&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the name of the savepoint to roll back to.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The savepoint remains valid and can be rolled back to again later if needed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When an operation is rolled back, any locks that are acquired by the operation are also rolled back.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ROLLBACK TO SAVEPOINT implicitly destroys all savepoints that were established after the named savepoint.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example rolls back the values 102 and 103 that were entered after the savepoint, &lt;code&gt;my_savepoint&lt;/code&gt;, was established. Only the values 101 and 104 are inserted at commit.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; INSERT INTO product_key VALUES (101);
=&amp;gt; SAVEPOINT my_savepoint;
=&amp;gt; INSERT INTO product_key VALUES (102);
=&amp;gt; INSERT INTO product_key VALUES (103);
=&amp;gt; ROLLBACK TO SAVEPOINT my_savepoint;
=&amp;gt; INSERT INTO product_key VALUES (104);
=&amp;gt; COMMIT;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/release-savepoint/#&#34;&gt;RELEASE SAVEPOINT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/savepoint/#&#34;&gt;SAVEPOINT&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SAVE QUERY</title>
      <link>/en/sql-reference/statements/save-query/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/save-query/</guid>
      <description>
        
        
        &lt;p&gt;Saves an input query to associate with a custom directed query.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SAVE QUERY &lt;span class=&#34;code-variable&#34;&gt;input-query&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-query&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The input query to associate with a custom directed query. The input query supports only one optimizer hint, 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/v/#&#34;&gt;:v&lt;/a&gt;&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/db-superuser/&#34; title=&#34;&#34;&gt;Superuser&lt;/a&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;p&gt;SAVE QUERY saves the specified input query for use by the next invocation of &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-directed-query/&#34;&gt;CREATE DIRECTED QUERY CUSTOM&lt;/a&gt;. CREATE DIRECTED QUERY CUSTOM pairs the saved query with its annotated query argument to create a directed query. Both statements must be issued in the same user session.&lt;/p&gt;
&lt;p&gt;The saved query remains available until the one of the following events occurs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The next invocation of CREATE DIRECTED QUERY, whether invoked with CUSTOM or OPTIMIZER.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Another invocation of SAVE QUERY.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The session ends.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;admonition caution&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Caution&lt;/h4&gt;

OpenText™ Analytics Database associates a saved query with a directed query without checking whether the input and annotated queries are compatible. Be careful to sequence SAVE QUERY and CREATE DIRECTED QUERY CUSTOM so the saved and directed queries are correctly matched.

&lt;/div&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/managing-queries/directed-queries/creating-directed-queries/custom-directed-queries/#&#34;&gt;Custom directed queries&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SAVE RESTORE POINT TO ARCHIVE</title>
      <link>/en/sql-reference/statements/save-restore-point/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/save-restore-point/</guid>
      <description>
        
        
        &lt;p&gt;&lt;strong&gt;Eon Mode only&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Saves an &lt;a href=&#34;../../../en/eon/revive-eon-db/in-db-restore-points/&#34;&gt;in-database restore point&lt;/a&gt; to an &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-archive/&#34;&gt;archive&lt;/a&gt;. After the restore point is saved, you can revive the database to the state at which the restore point was saved. For details on reviving your database from a restore point, see &lt;a href=&#34;../../../en/eon/revive-eon-db/in-db-restore-points/full-db-revive/#&#34;&gt;Revive from a restore point&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SAVE RESTORE POINT TO ARCHIVE &lt;span class=&#34;code-variable&#34;&gt;archive-name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;archive-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the archive to which the restore point is saved.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Superuser or archive owner&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following statement saves a restore point to the &lt;code&gt;verticadb&lt;/code&gt; archive:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SAVE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RESTORE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;POINT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARCHIVE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SAVE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RESTORE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;POINT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To view all restore points in the database, query the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/archive-restore-points/#&#34;&gt;ARCHIVE_RESTORE_POINTS&lt;/a&gt; system table:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARCHIVE_RESTORE_POINTS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;                  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;save_time&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;index&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;archive&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------------------------------------+----------------------------+-------+-----------+----------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2616&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;f6cd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e98c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;472&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;d5c&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a7f459dff82b&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2021&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;58&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;565311&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;COMPLETE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;116066&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cc&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cb&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ce5&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;9&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a27&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;170538&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ba95cf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2021&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;06&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;02&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;48&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;059941&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;verticadb&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;COMPLETE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;rows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-archive/#&#34;&gt;CREATE ARCHIVE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/drop-statements/drop-archive/#&#34;&gt;DROP ARCHIVE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/remove-restore-point/#&#34;&gt;REMOVE RESTORE POINT FROM ARCHIVE&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SAVEPOINT</title>
      <link>/en/sql-reference/statements/savepoint/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/savepoint/</guid>
      <description>
        
        
        &lt;p&gt;
Creates a special mark, called a savepoint, inside a transaction. A savepoint allows all commands that are executed after it was established to be rolled back, restoring the transaction to the state it was in at the point in which the savepoint was established.

&lt;div class=&#34;alert admonition tip&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Tip&lt;/h4&gt;

Savepoints are useful when creating nested transactions. For example, a savepoint could be created at the beginning of a subroutine. That way, the result of the subroutine could be rolled back if necessary.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SAVEPOINT &lt;span class=&#34;code-variable&#34;&gt;savepoint_name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;savepoint_name&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the name of the savepoint to create.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Savepoints are local to a transaction and can only be established when inside a transaction block.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multiple savepoints can be defined within a transaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If a savepoint with the same name already exists, it is replaced with the new savepoint.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example illustrates how a savepoint determines which values within a transaction can be rolled back. The values 102 and 103 that were entered after the savepoint, &lt;code&gt;my_savepoint&lt;/code&gt;, was established are rolled back. Only the values 101 and 104 are inserted at commit.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; INSERT INTO T1 (product_key) VALUES (101);
=&amp;gt; SAVEPOINT my_savepoint;
=&amp;gt; INSERT INTO T1 (product_key) VALUES (102);
=&amp;gt; INSERT INTO T1 (product_key) VALUES (103);
=&amp;gt; ROLLBACK TO SAVEPOINT my_savepoint;
=&amp;gt; INSERT INTO T1 (product_key) VALUES (104);
=&amp;gt; COMMIT;
=&amp;gt; SELECT product_key FROM T1;
.
.
.
101
104
(2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/release-savepoint/#&#34;&gt;RELEASE SAVEPOINT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/rollback-to-savepoint/#&#34;&gt;ROLLBACK TO SAVEPOINT&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SELECT</title>
      <link>/en/sql-reference/statements/select/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/select/</guid>
      <description>
        
        
        &lt;p&gt;Returns a result set from one or more data sources—&lt;a href=&#34;../../../en/sql-reference/statements/select/from-clause/table-reference/&#34;&gt;tables&lt;/a&gt;, &lt;a href=&#34;../../../en/data-analysis/views/&#34;&gt;views&lt;/a&gt;, &lt;a href=&#34;../../../en/sql-reference/statements/select/from-clause/joined-table/&#34;&gt;joined tables&lt;/a&gt;, and named &lt;a href=&#34;../../../en/data-analysis/queries/subqueries/&#34;&gt;subqueries&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[ AT &lt;span class=&#34;code-variable&#34;&gt;epoch&lt;/span&gt; ] [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/with-clause/#&#34;&gt;WITH-clause&lt;/a&gt;&lt;/span&gt; ] SELECT [ ALL | DISTINCT ]
    { * | { &lt;a href=&#34;../../../en/sql-reference/functions/match-and-search-functions/regular-expression-functions/match-columns/#&#34;&gt;MATCH_COLUMNS&lt;/a&gt;(&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;pattern&lt;/span&gt;&amp;#39;) | &lt;span class=&#34;code-variable&#34;&gt;expression &lt;/span&gt;[ [AS] &lt;span class=&#34;code-variable&#34;&gt;alias &lt;/span&gt;] }[,...] }
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/into-table-clause/#&#34;&gt;into-table-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/from-clause/#&#34;&gt;from-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/where-clause/#&#34;&gt;where-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/timeseries-clause/#&#34;&gt;time-series-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/group-by-clause/#&#34;&gt;group-by-clause&lt;/a&gt;&lt;/span&gt;[,...] ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/having-clause/#&#34;&gt;having-clause&lt;/a&gt;&lt;/span&gt;[,...] ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/match-clause/#&#34;&gt;match-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/union-clause/#&#34;&gt;union-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/intersect-clause/#&#34;&gt;intersect-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/except-clause/#&#34;&gt;except-clause&lt;/a&gt;&lt;/span&gt; ]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/order-by-clause/#&#34;&gt;order-by-clause&lt;/a&gt;&lt;/span&gt; [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/offset-clause/#&#34;&gt;offset-clause&lt;/a&gt;&lt;/span&gt; ]]
    [ &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../en/sql-reference/statements/select/limit-clause/#&#34;&gt;limit-clause&lt;/a&gt;&lt;/span&gt; ]
    [ FOR UPDATE [ OF &lt;span class=&#34;code-variable&#34;&gt;table-name&lt;/span&gt;[,...] ] ]
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;SELECT statements can also embed various directives, or &lt;em&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/hints/&#34;&gt;hints&lt;/a&gt;&lt;/em&gt;, that let you control how a given query is handled—for example, join hints such as &lt;a href=&#34;../../../en/sql-reference/language-elements/hints/jtype/#&#34;&gt;JTYPE&lt;/a&gt;, which enforces the join type (merge or hash join).&lt;/p&gt;
&lt;p&gt;For details on using OpenText™ Analytics Database hints, see &lt;a href=&#34;../../../en/sql-reference/language-elements/hints/#&#34;&gt;Hints&lt;/a&gt;.&lt;/p&gt;


&lt;/div&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;AT &lt;/code&gt;&lt;em&gt;&lt;code&gt;epoch&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Returns data from the specified epoch, where &lt;em&gt;&lt;code&gt;epoch&lt;/code&gt;&lt;/em&gt; is one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;EPOCH LATEST&lt;/code&gt;: Return data up to but not including the current epoch. The result set includes data from the latest committed DML transaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;EPOCH &lt;/code&gt;&lt;em&gt;&lt;code&gt;integer&lt;/code&gt;&lt;/em&gt;: Return data up to and including the specified epoch.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;TIME &#39;&lt;/code&gt;&lt;em&gt;&lt;code&gt;timestamp&lt;/code&gt;&lt;/em&gt;&lt;code&gt;&#39;&lt;/code&gt;: Return data from the epoch at the specified timestamp.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These options are ignored if used to query temporary or external tables.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/failure-recovery/epochs/#&#34;&gt;Epochs&lt;/a&gt; for additional information about how OpenText™ Analytics Database uses epochs.&lt;/p&gt;

&lt;p&gt;For details, see &lt;a href=&#34;../../../en/data-analysis/queries/historical-queries/#&#34;&gt;Historical queries&lt;/a&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ALL | DISTINCT&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ALL&lt;/code&gt; (default): Retains duplicate rows in result set or group.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;DISTINCT&lt;/code&gt;: Removes duplicate rows from the result set or group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
The &lt;code&gt;ALL&lt;/code&gt; or &lt;code&gt;DISTINCT&lt;/code&gt; qualifier must immediately follow the &lt;code&gt;SELECT&lt;/code&gt; keyword. Only one instance of this keyword can appear in the select list.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;*&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Lists all columns in the queried tables.

&lt;div class=&#34;admonition caution&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Caution&lt;/h4&gt;

Selecting all columns from the queried tables can produce a very large wide set, which can adversely affect performance.

&lt;/div&gt;&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/match-and-search-functions/regular-expression-functions/match-columns/#&#34;&gt;MATCH_COLUMNS&lt;/a&gt;(&#39;&lt;span class=&#34;code-variable&#34;&gt;pattern&lt;/span&gt;&#39;)&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Returns all columns in the queried tables that match &lt;em&gt;&lt;code&gt;pattern&lt;/code&gt;&lt;/em&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;expression&lt;/code&gt;&lt;/em&gt; &lt;code&gt;[[AS]&lt;/code&gt; &lt;em&gt;&lt;code&gt;alias&lt;/code&gt;&lt;/em&gt;&lt;code&gt;]&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An expression that typically resolves to column data from the queried tables—for example, names of &lt;a href=&#34;../../../en/sql-reference/language-elements/expressions/column-references/&#34;&gt;columns&lt;/a&gt; that are specified in the FROM clause; also:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/literals/&#34;&gt;Literals&lt;/a&gt; (constants)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/expressions/aggregate-expressions/&#34;&gt;Aggregate expressions&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/language-elements/expressions/case-expressions/&#34;&gt;CASE expressions&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/functions/&#34;&gt;SQL functions&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Subqueries in the SELECT list&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can optionally assign a temporary alias to each column expression and reference that alias elsewhere in the SELECT statement—for example, in the query predicate or ORDER BY clause. The database uses the alias as the column heading in query output.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;FOR UPDATE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies to obtain an X lock on all tables specified in the query, most often used from &lt;code&gt;READ COMMITTED&lt;/code&gt; isolation.
&lt;p&gt;&lt;code&gt;FOR UPDATE&lt;/code&gt; requires update/delete permissions on the queried tables and cannot be issued from a read-only transaction.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;USAGE on the schema&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SELECT on the table or view&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;As view owner, you can grant other users SELECT privilege on the view only if one of the following is true:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You own the view&#39;s base table.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You have SELECT...WITH GRANT OPTION privilege on the view&#39;s base table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;When multiple clients run transactions as in the following example query, deadlocks can occur if &lt;code&gt;FOR UPDATE&lt;/code&gt; is not used. Two transactions acquire an S lock, and when both attempt to upgrade to an X lock, they encounter deadlocks:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT balance FROM accounts WHERE account_id=3476 FOR UPDATE;
    ...
=&amp;gt; UPDATE accounts SET balance = balance+10 WHERE account_id=3476;
=&amp;gt; COMMIT;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/locks/#&#34;&gt;LOCKS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/functions/analytic-functions/#&#34;&gt;Analytic functions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/data-analysis/sql-analytics/#&#34;&gt;SQL analytics&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/data-analysis/time-series-analytics/#&#34;&gt;Time series analytics&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/select/match-clause/event-series-pattern-matching/#&#34;&gt;Event series pattern matching&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/data-analysis/queries/subqueries/#&#34;&gt;Subqueries&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/data-analysis/queries/joins/#&#34;&gt;Joins&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SET statements</title>
      <link>/en/sql-reference/statements/set-statements/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/set-statements/</guid>
      <description>
        
        
        &lt;p&gt;SET statements let you change how the database operates, such as changing the autocommit settings or the resource pool your session uses.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SHOW</title>
      <link>/en/sql-reference/statements/show/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/show/</guid>
      <description>
        
        
        &lt;p&gt;Shows run-time parameters for the current session.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SHOW { &lt;span class=&#34;code-variable&#34;&gt;parameter&lt;/span&gt; | ALL }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows all run-time settings.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;AUTOCOMMIT&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Returns on/off to indicate whether statements automatically commit their transactions when they complete.&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a name=&#34;AvailableRoles&#34;&gt;&lt;/a&gt;AVAILABLE ROLES&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Lists all &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/role/&#34; title=&#34;A role groups together a set of privileges that can be assigned to a user or another role.&#34;&gt;roles&lt;/a&gt; available to the user.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;AVAILABLE WORKLOADS&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Returns the workloads available to the user and their &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-roles/enabling-roles/&#34;&gt;enabled roles&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;DATESTYLE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the current style of date values. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-datestyle/#&#34;&gt;SET DATESTYLE&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a name=&#34;EnabledRoles&#34;&gt;&lt;/a&gt;ENABLED ROLES&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the roles enabled for the current session. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-role/#&#34;&gt;SET ROLE&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ESCAPE_STRING_WARNING&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Returns on/off to indicate whether warnings are issued when backslash escapes are found in strings. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-escape-string-warning/#&#34;&gt;SET ESCAPE_STRING_WARNING&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;GRACEPERIOD&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the session GRACEPERIOD set by &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-graceperiod/#&#34;&gt;SET SESSION GRACEPERIOD&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;IDLESESSIONTIMEOUT&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows how long the session can remain idle before it times out.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;INTERVALSTYLE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows whether units are output when printing intervals. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-intervalstyle/#&#34;&gt;SET INTERVALSTYLE&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;LOCALE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the current locale. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-locale/#&#34;&gt;SET LOCALE&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;MEMORYCAP&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the maximum amount of memory that any request use. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-memorycap/&#34;&gt;SET MEMORYCAP&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;MULTIPLEACTIVERESULTSETS&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Returns on/off to indicate whether multiple active result sets on one connection are allowed. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-multipleactiveresultsets/#&#34;&gt;SET SESSION MULTIPLEACTIVERESULTSETS&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;RESOURCE POOL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the resource pool that the session is using. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-resource-pool/&#34;&gt;SET RESOURCE POOL&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;RUNTIMECAP&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the maximum amount of time that queries can run in the session. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-runtimecap/&#34;&gt;SET RUNTIMECAP&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;SEARCH_PATH&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the order in which OpenText™ Analytics Database searches schemas. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-search-path/#&#34;&gt;SET SEARCH_PATH&lt;/a&gt;. For example:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW SEARCH_PATH;
    name     |                      setting
-------------+---------------------------------------------------
 search_path | &amp;#34;$user&amp;#34;, public, v_catalog, v_monitor, v_internal
(1 row)
  
&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;STANDARD_CONFORMING_STRINGS&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows whether backslash escapes are enabled for the session. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-standard-conforming-strings/#&#34;&gt;SET STANDARD_CONFORMING_STRINGS&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;TEMPSPACECAP&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the maximum amount of temporary file space that queries can use in the session. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-tempspacecap/&#34;&gt;SET TEMPSPACECAP&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;TIMEZONE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the timezone set in the current session. See &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-time-zone/&#34;&gt;SET TIMEZONE&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a name=&#34;ShowTransactionIsolation&#34;&gt;&lt;/a&gt;TRANSACTION_ISOLATION&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the current transaction isolation setting, as described in &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-characteristics-as-transaction/#&#34;&gt;SET SESSION CHARACTERISTICS AS TRANSACTION&lt;/a&gt;. For example:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW TRANSACTION_ISOLATION;
         name          |    setting
-----------------------+----------------
 transaction_isolation | READ COMMITTED
(1 row)
  
&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;&lt;a name=&#34;ShowTransactionReadOnly&#34;&gt;&lt;/a&gt;TRANSACTION_READ_ONLY&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Returns true/false to indicate the current read-only setting, as described in &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-characteristics-as-transaction/#&#34;&gt;SET SESSION CHARACTERISTICS AS TRANSACTION&lt;/a&gt;. For example:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW TRANSACTION_READ_ONLY;
         name          | setting
-----------------------+---------
 transaction_read_only | false
(1 row)
  
&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;WORKLOAD&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows the &lt;a href=&#34;../../../en/admin/managing-client-connections/connection-load-balancing/workload-routing/&#34;&gt;workloads&lt;/a&gt; associated with the current session.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Display all current runtime parameter settings:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW ALL;
            name             |                          setting
-----------------------------+-----------------------------------------------------------
 locale                      | en_US@collation=binary (LEN_KBINARY)
 autocommit                  | off
 standard_conforming_strings | on
 escape_string_warning       | on
 multipleactiveresultsets    | off
 datestyle                   | ISO, MDY
 intervalstyle               | plain
 timezone                    | America/New_York
 search_path                 | &amp;#34;$user&amp;#34;, public, v_catalog, v_monitor, v_internal, v_func
 transaction_isolation       | READ COMMITTED
 transaction_read_only       | false
 resource_pool               | general
 memorycap                   | UNLIMITED
 tempspacecap                | UNLIMITED
 runtimecap                  | UNLIMITED
 idlesessiontimeout          | UNLIMITED
 graceperiod                 | UNLIMITED
 enabled roles               | dbduser*, dbadmin*, pseudosuperuser*
 available roles             | dbduser*, dbadmin*, pseudosuperuser*
 tcp_keepalive               | idle_time: [7200], probe_interval: [75], probe_count: [9]
 workload                    | analytics
(21 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SHOW CURRENT</title>
      <link>/en/sql-reference/statements/show-current/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/show-current/</guid>
      <description>
        
        
        &lt;p&gt;Displays active configuration parameter values that are set at all levels. OpenText™ Analytics Database first checks values set at the session level. If a value is not set for a configuration parameter at the session level, the database next checks if the value is set for the node where you are logged in, and then checks the database level. If no values are set, &lt;code&gt;SHOW CURRENT&lt;/code&gt; shows the default value for the configuration parameter. If the configuration parameter requires a restart to take effect, the active values shown might differ from the set values.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SHOW CURRENT { &lt;span class=&#34;code-variable&#34;&gt;parameter-name&lt;/span&gt;[,...] | ALL }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;parameter-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Names of configuration parameters to show.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows all configuration parameters set at all levels.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superuser: &lt;code&gt;SHOW CURRENT ALL&lt;/code&gt; returns masked parameter settings. Attempts to view specific parameter settings return an error.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Show configuration parameters and their settings at all levels.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW CURRENT ALL;
level    |    name                   |setting
---------+---------------------------+---------
DEFAULT  | ActivePartitionCount      | 1
DEFAULT  | AdvanceAHMInterval        | 180
DEFAULT  | AHMBackupManagement       | 0
DATABASE | AnalyzeRowCountInterval   | 3600
SESSION  | ForceUDxFencedMode        | 1
NODE     | MaxClientSessions         | 0
...
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SHOW DATABASE</title>
      <link>/en/sql-reference/statements/show-db/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/show-db/</guid>
      <description>
        
        
        &lt;p&gt;Displays configuration parameter values that are set for the database.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
You can also get detailed information on configuration parameters, including their current and default values, by querying system table &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/config-parameters/#&#34;&gt;CONFIGURATION_PARAMETERS&lt;/a&gt;.
&lt;/div&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

If the configuration parameter is set but requires a database restart to take effect, the value shown might differ from the active value.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SHOW DATABASE &lt;span class=&#34;code-variable&#34;&gt;db-spec&lt;/span&gt; { &lt;span class=&#34;code-variable&#34;&gt;parameter-name&lt;/span&gt;[,...] | ALL }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;db-spec&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Specifies the current database, set to the database name or &lt;code&gt;DEFAULT&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;parameter-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Names of one or more configuration parameters to show.Non-superusers can only specify parameters whose settings are not masked by &lt;code&gt;SHOW DATABASE...ALL&lt;/code&gt;, otherwise OpenText™ Analytics Database returns an error.
&lt;p&gt;If you specify a single parameter that is not set, &lt;code&gt;SHOW DATABASE&lt;/code&gt; returns an empty row for that parameter.&lt;/p&gt;
&lt;p&gt;To obtain the names of database-level parameters, query system table 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/config-parameters/#&#34;&gt;CONFIGURATION_PARAMETERS&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows all configuration parameters set at the database level. For non-superusers, the database masks settings of security parameters, which only superusers can access.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Superuser: Shows all database parameter settings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Non-superuser: Masks all security parameter settings, which only superusers can access. To determine which parameters require superuser privileges, query system table 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/config-parameters/#&#34;&gt;CONFIGURATION_PARAMETERS&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Show to a non-superuser all configuration parameters that are set on the database:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW DATABASE DEFAULT ALL;
              name              | setting
--------------------------------+----------
 AllowNumericOverflow           | 1
 CopyFaultTolerantExpressions   | 1
 GlobalHeirUsername             | ********
 MaxClientSessions              | 50
 NumericSumExtraPrecisionDigits | 0
(6 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Show settings for two configuration parameters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW DATABASE DEFAULT AllowNumericOverflow, NumericSumExtraPrecisionDigits;
              name              | setting
--------------------------------+---------
 AllowNumericOverflow           | 1
 NumericSumExtraPrecisionDigits | 0
(2 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SHOW NODE</title>
      <link>/en/sql-reference/statements/show-node/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/show-node/</guid>
      <description>
        
        
        &lt;p&gt;Displays configuration parameter values that are set for a node. If you specify a parameter that is not set, &lt;code&gt;SHOW NODE&lt;/code&gt; returns an empty row for that parameter.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

If the configuration parameter is set but requires a database restart to take effect, the value shown might differ from the active value.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SHOW NODE &lt;span class=&#34;code-variable&#34;&gt;node-name&lt;/span&gt; { &lt;span class=&#34;code-variable&#34;&gt;parameter-name&lt;/span&gt; [,...] | ALL }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;node-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the target node.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;parameter-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Names of one or more node-level configuration parameters. To obtain the names of node-level parameters, query system table 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/config-parameters/#&#34;&gt;CONFIGURATION_PARAMETERS&lt;/a&gt;&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows all configuration parameters set at the node level.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;View all configuration parameters and their settings for node &lt;code&gt;v_vmart_node0001&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW NODE v_vmart_node0001 ALL;
           name            | setting
---------------------------+---------
 DefaultIdleSessionTimeout | 5 hour
 MaxClientSessions         | 20
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SHOW SESSION</title>
      <link>/en/sql-reference/statements/show-session/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/show-session/</guid>
      <description>
        
        
        &lt;p&gt;Displays configuration parameter values that are set for the current session. If you specify a parameter that is not set, &lt;code&gt;SHOW SESSION&lt;/code&gt; returns an empty row for that parameter.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

If the configuration parameter is set but requires a database restart to take effect, the value shown might differ from the active value.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SHOW SESSION { ALL | UDPARAMETER ALL }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows all OpenText™ Analytics Database configuration parameters set at the session level.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;UDPARAMETER ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Shows all parameters defined by user-defined extensions. These parameters are not shown in the CONFIGURATION_PARAMETERS table.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;View all database configuration parameters and their settings for the current session. User-defined parameters are not included:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW SESSION ALL;
name                        |                      setting
----------------------------+---------------------------------------------------
locale                      | en_US@collation=binary (LEN_KBINARY)
autocommit                  | off
standard_conforming_strings | on
escape_string_warning       | on
datestyle                   | ISO, MDY
intervalstyle               | plain
timezone                    | America/New_York
search_path                 | &amp;#34;$user&amp;#34;, public, v_catalog, v_monitor, v_internal
transaction_isolation       | READ COMMITTED
transaction_read_only       | false
resource_pool               | general
memorycap                   | UNLIMITED
tempspacecap                | UNLIMITED
runtimecap                  | UNLIMITED
enabled roles               | dbduser*, dbadmin*, pseudosuperuser*
available roles             | dbduser*, dbadmin*, pseudosuperuser*
ForceUDxFencedMode          | 1
(17 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SHOW USER</title>
      <link>/en/sql-reference/statements/show-user/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/show-user/</guid>
      <description>
        
        
        &lt;p&gt;Displays configuration parameter settings for database users. To get the names of user-level parameters, query system table &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/config-parameters/#&#34;&gt;CONFIGURATION_PARAMETERS&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT parameter_name, allowed_levels FROM configuration_parameters
      WHERE allowed_levels ilike &amp;#39;%USER%&amp;#39; AND parameter_name ilike &amp;#39;%depot%&amp;#39;;
     parameter_name      |     allowed_levels
-------------------------+-------------------------
 UseDepotForWrites       | SESSION, USER, DATABASE
 DepotOperationsForQuery | SESSION, USER, DATABASE
 UseDepotForReads        | SESSION, USER, DATABASE
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SHOW USER { &lt;span class=&#34;code-variable&#34;&gt;user-name&lt;/span&gt; | ALL } [PARAMETER] { &lt;span class=&#34;code-variable&#34;&gt;cfg-parameter&lt;/span&gt; [,...] | ALL }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;user-name&lt;/code&gt;&lt;/em&gt;&lt;code&gt; | ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Show parameter settings for the specified user, or for all users.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;[PARAMETER] &lt;/code&gt;&lt;em&gt;&lt;code&gt;parameter-list&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-delimited list of user-level configuration parameters.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;PARAMETER ALL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Show all configuration parameters that are set for the specified users.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers: Can view only their own configuration parameter settings.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows configuration parameter settings for two users, Yvonne and Ahmed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT user_name FROM v_catalog.users WHERE user_name != &amp;#39;dbadmin&amp;#39;;
 user_name
-----------
 Ahmed
 Yvonne
(2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW USER Yvonne PARAMETER ALL;
  user  |        parameter        | setting
--------+-------------------------+---------
 Yvonne | DepotOperationsForQuery | Fetches
(1 row)

=&amp;gt; ALTER USER Yvonne SET PARAMETER UseDepotForWrites = 0;
ALTER USER
=&amp;gt; SHOW USER Yvonne PARAMETER ALL;
  user  |        parameter        | setting
--------+-------------------------+---------
 Yvonne | DepotOperationsForQuery | Fetches
 Yvonne | UseDepotForWrites       | 0
(2 rows)

=&amp;gt; ALTER USER Ahmed SET PARAMETER DepotOperationsForQuery = &amp;#39;Fetches&amp;#39;;
ALTER USER
=&amp;gt; SHOW USER ALL PARAMETER ALL;
  user  |        parameter        | setting
--------+-------------------------+---------
 Ahmed  | DepotOperationsForQuery | Fetches
 Yvonne | DepotOperationsForQuery | Fetches
 Yvonne | UseDepotForWrites       | 0
(3 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-user/#&#34;&gt;ALTER USER&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: START TRANSACTION</title>
      <link>/en/sql-reference/statements/start-transaction/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/start-transaction/</guid>
      <description>
        
        
        &lt;p&gt;Starts a transaction block.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;START TRANSACTION [ &lt;span class=&#34;code-variable&#34;&gt;isolation_level&lt;/span&gt; ]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;where &lt;em&gt;isolation_level&lt;/em&gt; is one of:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }READ { ONLY | WRITE }
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;p&gt;Isolation level, described in the following table, determines what data the transaction can access when other transactions are running concurrently. The isolation level cannot be changed after the first query (&lt;code&gt;SELECT&lt;/code&gt;) or DML statement (&lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;) has run. A transaction retains its isolation level until it completes, even if the session&#39;s isolation level changes during the transaction. OpenText™ Analytics Database internal processes (such as the &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/tuple-mover-tm/&#34; title=&#34;The Tuple Mover manages ROS data storage.&#34;&gt;Tuple Mover&lt;/a&gt; and &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/refresh-projections/&#34; title=&#34;Ensures that all projections on a node are up-to-date (can participate in query execution).&#34;&gt;refresh&lt;/a&gt; operations) and DDL operations always run at the SERIALIZABLE isolation level to ensure consistency.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;WORK | TRANSACTION&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Have no effect; they are optional keywords for readability.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED } &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;ul&gt;
&lt;li&gt;SERIALIZABLE: Sets the strictest level of SQL transaction isolation. This level emulates transactions serially, rather than concurrently. It holds locks and blocks write operations until the transaction completes. Not recommended for normal query operations.&lt;/li&gt;
&lt;li&gt;REPEATABLE READ: Automatically converted to SERIALIZABLE by OpenText™ Analytics Database.&lt;/li&gt;
&lt;li&gt;READ COMMITTED (Default): Allows concurrent transactions. Use READ COMMITTED isolation for normal query operations, but be aware that there is a subtle difference between them. See&lt;a href=&#34;../../../en/admin/transactions/#&#34;&gt;Transactions&lt;/a&gt;for more information.&lt;/li&gt;
&lt;li&gt;READ UNCOMMITTED: Automatically converted to READ COMMITTED by the database.&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;READ {WRITE | ONLY}&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Determines whether the transaction is read/write or read-only. Read/write is the default.
&lt;p&gt;Setting the transaction session mode to read-only disallows the following SQL commands, but does not prevent all disk write operations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;INSERT, UPDATE, DELETE, and COPY if the table they would write to is not a temporary table&lt;/li&gt;
&lt;li&gt;All CREATE, ALTER, and DROP commands&lt;/li&gt;
&lt;li&gt;GRANT, REVOKE, and EXPLAIN if the command it would run is among those listed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/statements/begin/#&#34;&gt;BEGIN&lt;/a&gt; performs the same function as START TRANSACTION.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example shows how to start a transaction.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;= &amp;gt; START TRANSACTION ISOLATION LEVEL READ COMMITTED READ WRITE;
START TRANSACTION
=&amp;gt; CREATE TABLE sample_table (a INT);
CREATE TABLE
=&amp;gt; INSERT INTO sample_table (a) VALUES (1);
OUTPUT
--------
1
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/transactions/#&#34;&gt;Transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/connecting-to/client-libraries/accessing/c/querying-db-using-ado-net/inserting-data-ado-net/creating-and-rolling-back-transactions/#&#34;&gt;Creating and rolling back transactions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/commit/#&#34;&gt;COMMIT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/end/#&#34;&gt;END&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/rollback/#&#34;&gt;ROLLBACK&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: TRUNCATE TABLE</title>
      <link>/en/sql-reference/statements/truncate-table/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/truncate-table/</guid>
      <description>
        
        
        &lt;p&gt;Removes all storage associated with a table, while leaving the table definition intact. TRUNCATE TABLE auto-commits the current transaction after statement execution and cannot be rolled back.&lt;/p&gt;
&lt;p&gt;TRUNCATE TABLE also performs the following actions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Removes all table history preceding the current epoch. After TRUNCATE TABLE returns, AT EPOCH queries on the truncated table return nothing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Drops all &lt;a href=&#34;../../../en/admin/collecting-db-statistics/collecting-table-statistics/&#34;&gt;table&lt;/a&gt;- and &lt;a href=&#34;../../../en/admin/collecting-db-statistics/collecting-partition-statistics/&#34;&gt;partition&lt;/a&gt;-level statistics.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;TRUNCATE TABLE [[{&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;namespace&lt;/span&gt; }.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;table-name &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;{ &lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt; &lt;code&gt;|&lt;/code&gt; &lt;em&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/em&gt;&lt;code&gt; }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the database or &lt;a href=&#34;../../../en/architecture/eon-concepts/shards-and-subscriptions/&#34;&gt;namespace&lt;/a&gt; that contains &lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Database name: If specified, it must be the current database.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Namespace name (Eon Mode only): You must specify the namespace of objects in non-default namespaces. If no namespace is provided, it is assumed the object is in the default namespace.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the schema, by default &lt;code&gt;public&lt;/code&gt;. If you specify the namespace or database name, you must provide the schema name, even if the schema is &lt;code&gt;public&lt;/code&gt;.
&lt;p&gt;If you specify a schema name that contains a period, the part before the period cannot be the same as the name of an existing namespace.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;table-name &lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the anchor table or temporary table to truncate. You cannot truncate an external table.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superuser:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Table owner&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;USAGE privileges on table schema&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/admin/working-with-native-tables/removing-table-data/truncating-tables/#&#34;&gt;Truncating tables&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/delete/#&#34;&gt;DELETE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/drop-statements/drop-table/#&#34;&gt;DROP TABLE&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
