<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Data types</title>
    <link>/en/sql-reference/data-types/</link>
    <description>Recent content in Data types on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/data-types/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: Binary data types (BINARY and VARBINARY)</title>
      <link>/en/sql-reference/data-types/binary-data-types-binary-and-varbinary/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/binary-data-types-binary-and-varbinary/</guid>
      <description>
        
        
        &lt;p&gt;Store raw-byte data, such as IP addresses, up to 65000 bytes. The &lt;span class=&#34;sql&#34;&gt;BINARY&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;BINARY VARYING&lt;/span&gt; (&lt;span class=&#34;sql&#34;&gt;VARBINARY&lt;/span&gt;) data types are collectively referred to as &lt;em&gt;binary string types&lt;/em&gt; and the values of binary string types are referred to as &lt;em&gt;binary strings&lt;/em&gt;. A binary string is a sequence of octets or bytes.&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;BYTEA&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;RAW&lt;/span&gt; are synonyms for &lt;span class=&#34;sql&#34;&gt;VARBINARY&lt;/span&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;BINARY ( &lt;span class=&#34;code-variable&#34;&gt;length&lt;/span&gt; )
{ VARBINARY | BINARY VARYING | BYTEA | RAW } ( &lt;span class=&#34;code-variable&#34;&gt;max-length &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;length&lt;/code&gt;&lt;/em&gt;, &lt;em&gt;&lt;code&gt;max-length&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The length of the string or column width, in bytes (octets).&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;binary-and-varbinary-data-types&#34;&gt;BINARY and VARBINARY data types&lt;/h2&gt;
&lt;p&gt;BINARY and VARBINARY data types have the following attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;BINARY&lt;/span&gt;: A fixed-width string of &lt;em&gt;&lt;code&gt;length&lt;/code&gt;&lt;/em&gt; bytes, where the number of bytes is declared as an optional specifier to the type. If &lt;em&gt;&lt;code&gt;length&lt;/code&gt;&lt;/em&gt; is omitted, the default is 1. Where necessary, values are right-extended to the full width of the column with the zero byte. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TO_HEX(&amp;#39;ab&amp;#39;::BINARY(4));
  to_hex
----------
 61620000
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;VARBINARY&lt;/span&gt;: A variable-width string up to a length of &lt;em&gt;&lt;code&gt;max-length&lt;/code&gt;&lt;/em&gt; bytes, where the maximum number of bytes is declared as an optional specifier to the type. The default is the default attribute size, which is 80, and the maximum length is 65000 bytes. VARBINARY values are not extended to the full width of the column. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TO_HEX(&amp;#39;ab&amp;#39;::VARBINARY(4));
 to_hex
--------
 6162
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;input-formats&#34;&gt;Input formats&lt;/h2&gt;
&lt;p&gt;You can use several formats when working with binary values. The hexadecimal format is generally the most straightforward and is emphasized in OpenText™ Analytics Database documentation.&lt;/p&gt;
&lt;p&gt;Binary values can also be represented in octal format by prefixing the value with a backslash &lt;code&gt;&#39;\&#39;&lt;/code&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 use &lt;code&gt;vsql&lt;/code&gt;, you must use the escape character (&lt;code&gt;\&lt;/code&gt;) when you insert another backslash on input; for example, input &lt;code&gt;&#39;\141&#39;&lt;/code&gt; as &lt;code&gt;&#39;\\141&#39;&lt;/code&gt;.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You can also input values represented by printable characters. For example, the hexadecimal value &lt;code&gt;&#39;0x61&#39;&lt;/code&gt; can also be represented by the symbol &lt;code&gt;a&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&#34;../../../en/data-load/#&#34;&gt;Data load&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On input, strings are translated from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Hexadecimal representation to a binary value using the function &lt;a href=&#34;../../../en/sql-reference/functions/data-type-specific-functions/string-functions/hex-to-binary/#&#34;&gt;HEX_TO_BINARY&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/bitstring/&#34; title=&#34;A sequence of bits.&#34;&gt;Bitstring&lt;/a&gt; representation to a binary value using the function &lt;a href=&#34;../../../en/sql-reference/functions/data-type-specific-functions/string-functions/bitstring-to-binary/#&#34;&gt;BITSTRING_TO_BINARY&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both functions take a &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; argument and return a &lt;span class=&#34;sql&#34;&gt;VARBINARY&lt;/span&gt; value.&lt;/p&gt;
&lt;h2 id=&#34;output-formats&#34;&gt;Output formats&lt;/h2&gt;
&lt;p&gt;Like the input format, the output format is a hybrid of octal codes and printable ASCII characters. A byte in the range of printable ASCII characters (the range &lt;code&gt;[0x20, 0x7e]&lt;/code&gt;) is represented by the corresponding ASCII character, with the exception of the backslash (&lt;code&gt;&#39;\&#39;&lt;/code&gt;), which is escaped as &lt;code&gt;&#39;\\&#39;&lt;/code&gt;. All other byte values are represented by their corresponding octal values. For example, the bytes {97,92,98,99}, which in ASCII are &lt;code&gt;{a,\,b,c}&lt;/code&gt;, are translated to text as &lt;code&gt;&#39;a\\bc&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;binary-operators-and-functions&#34;&gt;Binary operators and functions&lt;/h2&gt;
&lt;p&gt;The binary operators &lt;code&gt;&amp;amp;&lt;/code&gt;, &lt;code&gt;~&lt;/code&gt;, &lt;code&gt;|&lt;/code&gt;, and &lt;code&gt;#&lt;/code&gt; have special behavior for binary data types, as described in &lt;a href=&#34;../../../en/sql-reference/language-elements/operators/bitwise-operators/#&#34;&gt;Bitwise operators&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following aggregate functions are supported for binary data types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/bit-and/#&#34;&gt;BIT_AND&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/bit-or/&#34;&gt;BIT_OR&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/bit-xor/#&#34;&gt;BIT_XOR&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/max-aggregate/&#34;&gt;MAX&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/min-aggregate/&#34;&gt;MIN&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;BIT_AND&lt;/span&gt;, &lt;span class=&#34;sql&#34;&gt;BIT_OR&lt;/span&gt;, and &lt;span class=&#34;sql&#34;&gt;BIT_XOR&lt;/span&gt; are bit-wise operations that are applied to each non-null value in a group, while &lt;span class=&#34;sql&#34;&gt;MAX&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;MIN&lt;/span&gt; are byte-wise comparisons of binary values.&lt;/p&gt;
&lt;p&gt;Like their &lt;a href=&#34;../../../en/sql-reference/language-elements/operators/bitwise-operators/&#34;&gt;binary operator&lt;/a&gt; counterparts, if the values in a group vary in length, the aggregate functions treat the values as though they are all equal in length by extending shorter values with zero bytes to the full width of the column. For example, given a group containing the values &lt;code&gt;&#39;ff&#39;, null, and &#39;f&#39;&lt;/code&gt;, a binary aggregate ignores the null value and treats the value &lt;code&gt;&#39;f&#39;&lt;/code&gt; as &lt;code&gt;&#39;f0&#39;&lt;/code&gt;. Also, like their binary operator counterparts, these aggregate functions operate on &lt;span class=&#34;sql&#34;&gt;VARBINARY&lt;/span&gt; types explicitly and operate on &lt;span class=&#34;sql&#34;&gt;BINARY&lt;/span&gt; types implicitly through casts. See &lt;a href=&#34;../../../en/sql-reference/language-elements/operators/data-type-coercion-operators-cast/#&#34;&gt;Data type coercion operators (CAST)&lt;/a&gt;.
&lt;/p&gt;
&lt;h2 id=&#34;binary-versus-character-data-types&#34;&gt;Binary versus character data types&lt;/h2&gt;
&lt;p&gt;The &lt;span class=&#34;sql&#34;&gt;BINARY&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;VARBINARY&lt;/span&gt; binary types are similar to the &lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; &lt;a href=&#34;../../../en/sql-reference/data-types/character-data-types-char-and-varchar/&#34;&gt;character data types&lt;/a&gt;, respectively. They differ as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Binary data types contain byte strings (a sequence of octets or bytes).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Character data types contain character strings (text).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The lengths of binary data types are measured in bytes, while character data types are measured in characters.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Examples&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows &lt;a href=&#34;../../../en/sql-reference/functions/data-type-specific-functions/string-functions/hex-to-binary/#&#34;&gt;HEX_TO_BINARY&lt;/a&gt; and &lt;a href=&#34;../../../en/sql-reference/functions/formatting-functions/to-hex/#&#34;&gt;TO_HEX&lt;/a&gt; usage.&lt;/p&gt;
&lt;p&gt;Table &lt;code&gt;t&lt;/code&gt; and its projection are created with binary columns:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE t (c BINARY(1));
=&amp;gt; CREATE PROJECTION t_p (c) AS SELECT c FROM t;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Insert minimum byte and maximum byte values:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; INSERT INTO t values(HEX_TO_BINARY(&amp;#39;0x00&amp;#39;));
=&amp;gt; INSERT INTO t values(HEX_TO_BINARY(&amp;#39;0xFF&amp;#39;));
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Binary values can then be formatted in hex on output using the &lt;span class=&#34;sql&#34;&gt;TO_HEX&lt;/span&gt; function:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TO_HEX(c) FROM t;
 to_hex
 --------
  00
  ff
 (2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;span class=&#34;sql&#34;&gt;BIT_AND&lt;/span&gt;, &lt;span class=&#34;sql&#34;&gt;BIT_OR&lt;/span&gt;, and &lt;span class=&#34;sql&#34;&gt;BIT_XOR&lt;/span&gt; functions are interesting when operating on a group of values. For example, create a sample table and projections with binary columns:&lt;/p&gt;
&lt;p&gt;The example that follows uses table &lt;code&gt;t&lt;/code&gt; with a single column of &lt;code&gt;VARBINARY&lt;/code&gt; data type:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE t ( c VARBINARY(2) );
=&amp;gt; INSERT INTO t values(HEX_TO_BINARY(&amp;#39;0xFF00&amp;#39;));
=&amp;gt; INSERT INTO t values(HEX_TO_BINARY(&amp;#39;0xFFFF&amp;#39;));
=&amp;gt; INSERT INTO t values(HEX_TO_BINARY(&amp;#39;0xF00F&amp;#39;));
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Query table &lt;code&gt;t&lt;/code&gt; to see column &lt;code&gt;c&lt;/code&gt; output:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TO_HEX(c) FROM t;
 TO_HEX
--------
 ff00
 ffff
 f00f
(3 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now issue the bitwise &lt;span class=&#34;sql&#34;&gt;AND&lt;/span&gt; operation. Because these are aggregate functions, an implicit &lt;span class=&#34;sql&#34;&gt;GROUP BY&lt;/span&gt; operation is performed on results using &lt;code&gt;(ff00&amp;amp;(ffff)&amp;amp;f00f)&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TO_HEX(BIT_AND(c)) FROM t;
 TO_HEX
--------
f000
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Issue the bitwise &lt;span class=&#34;sql&#34;&gt;OR&lt;/span&gt; operation on &lt;code&gt;(ff00|(ffff)|f00f)&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TO_HEX(BIT_OR(c)) FROM t;
 TO_HEX
--------
ffff
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Issue the bitwise &lt;span class=&#34;sql&#34;&gt;XOR&lt;/span&gt; operation on &lt;code&gt;(ff00#(ffff)#f00f)&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TO_HEX(BIT_XOR(c)) FROM t;
 TO_HEX
--------
f0f0
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Boolean data type</title>
      <link>/en/sql-reference/data-types/boolean-data-type/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/boolean-data-type/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database provides the standard SQL type BOOLEAN, which has two states: true and false. The third state in SQL boolean logic is unknown, which is represented by the NULL value.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;BOOLEAN
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;p&gt;Valid literal data values for input are:

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



&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;TRUE&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;t&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;true&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;y&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;yes&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;1&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;FALSE&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;f&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;false&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;n&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;no&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;&#39;0&#39;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Do not confuse the &lt;code&gt;BOOLEAN&lt;/code&gt; data type with &lt;a href=&#34;../../../en/sql-reference/language-elements/operators/logical-operators/#&#34;&gt;Logical operators&lt;/a&gt; or the &lt;a href=&#34;../../../en/sql-reference/language-elements/predicates/boolean/#&#34;&gt;Boolean&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The keywords &lt;code&gt;TRUE&lt;/code&gt; and &lt;code&gt;FALSE&lt;/code&gt; are preferred and are SQL-compliant.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A Boolean value of NULL appears last (largest) in ascending order.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All other values must be enclosed in single quotes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boolean values are output using the letters t and f.&lt;/p&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/sql-reference/language-elements/expressions/null-value/#&#34;&gt;NULL value&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/data-types/data-type-coercion-chart/#&#34;&gt;Data type coercion chart&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Character data types (CHAR and VARCHAR)</title>
      <link>/en/sql-reference/data-types/character-data-types-char-and-varchar/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/character-data-types-char-and-varchar/</guid>
      <description>
        
        
        &lt;p&gt;Stores strings of letters, numbers, and symbols. The &lt;span class=&#34;sql&#34;&gt;CHARACTER&lt;/span&gt; (&lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt;) and &lt;span class=&#34;sql&#34;&gt;CHARACTER VARYING&lt;/span&gt; (&lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt;) data types are collectively referred to as &lt;em&gt;character string types&lt;/em&gt;, and the values of character string types are known as &lt;em&gt;character strings&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Character data can be stored as fixed-length or variable-length strings. Fixed-length strings are right-extended with spaces on output; variable-length strings are not extended.&lt;/p&gt;
&lt;p&gt;String literals in SQL statements must be enclosed in single quotes.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{ CHAR | CHARACTER } [ (&lt;span class=&#34;code-variable&#34;&gt;octet-length&lt;/span&gt;) ]
{ VARCHAR | CHARACTER VARYING ] } [ (&lt;span class=&#34;code-variable&#34;&gt;octet-length&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;octet-length&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Length of the string or column width, declared in bytes (octets).
&lt;p&gt;This argument is optional.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;char-versus-varchar-data-types&#34;&gt;CHAR versus VARCHAR data types&lt;/h2&gt;
&lt;p&gt;The following differences apply to &lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt; is conceptually a fixed-length, blank-padded string. Trailing blanks (spaces) are removed on input and are restored on output. The default length is 1, and the maximum length is 65000 octets (bytes).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; is a variable-length character data type. The default length is 80, and the maximum length is 65000 octets. For string values longer than 65000, use &lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/#&#34;&gt;Long data types&lt;/a&gt;. Values can include trailing spaces.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Normally, you use &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; for all of string data. Use &lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt; when you need fixed-width string output. For example, you can use &lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt; columns for data to be transferred to a legacy system that requires fixed-width strings.&lt;/p&gt;
&lt;h2 id=&#34;setting-maximum-length&#34;&gt;Setting maximum length&lt;/h2&gt;
&lt;p&gt;When you define character columns, specify the maximum size of any string to be stored in a column. For example, to store strings up to 24 octets in length, use one of the following definitions:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CHAR(24)    --- fixed-length
VARCHAR(24) --- variable-length
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The maximum length parameter for &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt; data types refers to the number of octets that can be stored in that field, not the number of characters (Unicode code points). When using multibyte UTF-8 characters, the fields must be sized to accommodate from 1 to 4 octets per character, depending on the data. If the data loaded into a &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; or &lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt; column exceeds the specified maximum size for that column, data is truncated on UTF-8 character boundaries to fit within the specified size. See &lt;a href=&#34;../../../en/sql-reference/statements/copy/&#34;&gt;&lt;code&gt;COPY&lt;/code&gt;&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;

Remember to include the extra octets required for multibyte characters in the column-width declaration, keeping in mind the 65000 octet column-width limit.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Due to compression in OpenText™ Analytics Database, the cost of overestimating the length of these fields is incurred primarily at load time and during sorts.&lt;/p&gt;
&lt;h2 id=&#34;null-versus-nul&#34;&gt;NULL versus NUL&lt;/h2&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;NULL&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;NUL&lt;/span&gt; differ as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;NUL&lt;/span&gt; represents a character whose ASCII/Unicode code is 0, sometimes qualified &amp;quot;ASCII NUL&amp;quot;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;NULL&lt;/span&gt; means no value, and is true of a field (column) or constant, not of a character.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class=&#34;sql&#34;&gt;CHAR&lt;/span&gt;, &lt;span class=&#34;sql&#34;&gt;LONG VARCHAR&lt;/span&gt;, and &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt; string data types accept ASCII NUL values.&lt;/p&gt;
&lt;p&gt;In ascending sorts, NULL appears last (largest).&lt;/p&gt;
&lt;p&gt;For additional information about NULL ordering, see &lt;a href=&#34;../../../en/data-analysis/query-optimization/analytic-functions/null-sort-order/#&#34;&gt;NULL sort order&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following example casts the input string containing &lt;span class=&#34;sql&#34;&gt;NUL&lt;/span&gt; values to &lt;span class=&#34;sql&#34;&gt;VARCHAR&lt;/span&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT &amp;#39;vert\0ica&amp;#39;::CHARACTER VARYING AS VARCHAR;
 VARCHAR
---------
 vert\0ica
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The result contains 9 characters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT LENGTH(&amp;#39;vert\0ica&amp;#39;::CHARACTER VARYING);
 length
--------
      9
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you use an &lt;a href=&#34;../../../en/sql-reference/language-elements/literals/string-literals/extended-string-literals/&#34;&gt;extended string literal&lt;/a&gt;, the length is 8 characters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT E&amp;#39;vert\0ica&amp;#39;::CHARACTER VARYING AS VARCHAR;
 VARCHAR
---------
 vertica
(1 row)
=&amp;gt; SELECT LENGTH(E&amp;#39;vert\0ica&amp;#39;::CHARACTER VARYING);
 LENGTH
--------
      8
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Date/time data types</title>
      <link>/en/sql-reference/data-types/datetime-data-types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/datetime-data-types/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database supports the full set of SQL date and time data types.&lt;/p&gt;
&lt;p&gt;The following rules apply to all date/time data types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;All have a size of 8 bytes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A date/time value of NULL is smallest relative to all other date/time values,.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The database uses Julian dates for all date/time calculations, which can correctly predict and calculate any date more recent than 4713 BC to far into the future, based on the assumption that the average length of the year is 365.2425 days.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All the date/time data types accept the special literal value &lt;code&gt;NOW&lt;/code&gt; to specify the current date and time. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT TIMESTAMP &amp;#39;NOW&amp;#39;;
         ?column?
---------------------------
 2020-09-23 08:23:50.42325
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By default, the database rounds with a maximum precision of six decimal places. You can substitute an integer between 0 and 6 for &lt;code&gt;p&lt;/code&gt; to &lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/interval/specifying-interval-precision/&#34;&gt;specify your preferred level of precision&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following table lists specific attributes of date/time data types:

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



&lt;tr&gt; 

&lt;th &gt;
Name&lt;/th&gt; 

&lt;th &gt;
Description&lt;/th&gt; 

&lt;th &gt;
Low Value&lt;/th&gt; 

&lt;th &gt;
High Value&lt;/th&gt; 

&lt;th &gt;
Resolution&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/date/#&#34;&gt;DATE&lt;/a&gt;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;


Dates only (no time of day)&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;~ 25e+15 BC&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;~ 25e+15 AD&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
1 day&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/timetimetz/#&#34;&gt;TIME&lt;/a&gt; [(p)]&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Time of day only (no date)&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;00:00:00.00&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;23:59:60.999999&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
1 μs&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/timetimetz/#&#34;&gt;TIMETZ&lt;/a&gt; [(p)]&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Time of day only, with time zone&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;00:00:00.00+14&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;23:59:59.999999-14&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
1 μs&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/timestamptimestamptz/#&#34;&gt;TIMESTAMP&lt;/a&gt; [(p)]&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Both date and time, without time zone&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;290279-12-22 19:59:05.224194 BC&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;294277-01-09 04:00:54.775806 AD&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
1 μs&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/timestamptimestamptz/#&#34;&gt;TIMESTAMPTZ&lt;/a&gt; [(p)]*&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Both date and time, with time zone&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;290279-12-22 19:59:05.224194 BC UTC&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;294277-01-09 04:00:54.775806 AD UTC&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
1 μs&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/interval/#&#34;&gt;INTERVAL&lt;/a&gt; DAY TO SECOND [(p)]&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Time intervals&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;-106751991 days  04:00:54.775807&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;+-106751991 days  04:00:54.775807&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
1 μs&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/interval/#&#34;&gt;INTERVAL&lt;/a&gt; YEAR TO MONTH&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Time intervals&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;~ -768e15 yrs&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;~ 768e15 yrs&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
1 month&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;time-zone-abbreviations-for-input&#34;&gt;Time zone abbreviations for input&lt;/h2&gt;
&lt;p&gt;The database recognizes the files in 
&lt;code&gt;/opt/vertica/share/timezonesets&lt;/code&gt; as date/time input values and defines the default list of strings accepted in the AT TIME ZONE &lt;em&gt;zone&lt;/em&gt; parameter. The names are not necessarily used for date/time output—output is driven by the official time zone abbreviations associated with the currently selected time zone parameter setting.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Long data types</title>
      <link>/en/sql-reference/data-types/long-data-types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/long-data-types/</guid>
      <description>
        
        
        &lt;p&gt;Store data up to 32000000 octets. OpenText™ Analytics Database supports two long data types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;LONG VARBINARY&lt;/code&gt;: Variable-length raw-byte data, such as spatial data. &lt;code&gt;LONG VARBINARY&lt;/code&gt; values are not extended to the full width of the column.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;LONG VARCHAR&lt;/code&gt;: Variable-length strings, such as log files and unstructured data. &lt;code&gt;LONG VARCHAR&lt;/code&gt; values are not extended to the full width of the column.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use &lt;code&gt;LONG&lt;/code&gt; data types only when you need to store data greater than the maximum size of &lt;code&gt;VARBINARY&lt;/code&gt; and &lt;code&gt;VARCHAR&lt;/code&gt; data types (65 KB). Long data can include unstructured data, online comments or posts, or small log files.&lt;/p&gt;
&lt;p&gt;Flex tables have a default &lt;code&gt;LONG VARBINARY __raw__&lt;/code&gt; column, with a &lt;code&gt;NOT NULL&lt;/code&gt; constraint. For more information, see &lt;a href=&#34;../../../en/flex-tables/#&#34;&gt;Flex tables&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;LONG VARBINARY [(&lt;span class=&#34;code-variable&#34;&gt;max-length&lt;/span&gt;)]
LONG VARCHAR [(&lt;span class=&#34;code-variable&#34;&gt;octet-length&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;max-length&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Length of the byte string or column width, declared in bytes (octets), up to 32000000.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1 MB&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;octet-length&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Length of the string or column width, declared in bytes (octets), up to 32000000.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1 MB&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;optimized-performance&#34;&gt;Optimized performance&lt;/h2&gt;
&lt;p&gt;For optimal performance of &lt;code&gt;LONG&lt;/code&gt; data types, OpenText recommends that you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use the &lt;code&gt;LONG&lt;/code&gt; data types as &lt;em&gt;storage only&lt;/em&gt; containers; the database supports operations on the content of &lt;code&gt;LONG&lt;/code&gt; data types, but does not support all the operations that &lt;code&gt;VARCHAR&lt;/code&gt; and &lt;code&gt;VARBINARY&lt;/code&gt; take.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;code&gt;VARBINARY&lt;/code&gt; and &lt;code&gt;VARCHAR&lt;/code&gt; data types, instead of their &lt;code&gt;LONG&lt;/code&gt; counterparts, whenever possible. &lt;code&gt;VARBINARY&lt;/code&gt; and &lt;code&gt;VARCHAR&lt;/code&gt; data types are more flexible and have a wider range of operations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do not sort, segment, or partition projections on &lt;code&gt;LONG&lt;/code&gt; data type columns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do not add constraints, such as a primary key, to any &lt;code&gt;LONG VARBINARY&lt;/code&gt; or &lt;code&gt;LONG VARCHAR&lt;/code&gt; columns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do not join or aggregate any &lt;code&gt;LONG&lt;/code&gt; data type columns.&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 creates a table &lt;code&gt;user_comments&lt;/code&gt; with a &lt;code&gt;LONG VARCHAR&lt;/code&gt; column and inserts data into it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE user_comments
                  (id INTEGER,
                  username VARCHAR(200),
                  time_posted TIMESTAMP,
                  comment_text LONG VARCHAR(200000));
=&amp;gt; INSERT INTO user_comments VALUES
                  (1,
                  &amp;#39;User1&amp;#39;,
                  TIMESTAMP &amp;#39;2013-06-25 12:47:32.62&amp;#39;,
                  &amp;#39;The weather tomorrow will be cold and rainy and then
                  on the day after, the sun will come and the temperature
                  will rise dramatically.&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Numeric data types</title>
      <link>/en/sql-reference/data-types/numeric-data-types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/numeric-data-types/</guid>
      <description>
        
        
        &lt;p&gt;Numeric data types are numbers stored in database columns. These data types are typically grouped by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Exact&lt;/strong&gt; numeric types, values where the precision and scale need to be preserved. The exact numeric types are &lt;code&gt;INTEGER&lt;/code&gt;, &lt;code&gt;BIGINT&lt;/code&gt;, &lt;code&gt;DECIMAL&lt;/code&gt;, &lt;code&gt;NUMERIC&lt;/code&gt;, &lt;code&gt;NUMBER&lt;/code&gt;, and &lt;code&gt;MONEY&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Approximate&lt;/strong&gt; numeric types, values where the precision needs to be preserved and the scale can be floating. The approximate numeric types are &lt;code&gt;DOUBLE PRECISION&lt;/code&gt;, &lt;code&gt;FLOAT&lt;/code&gt;, and &lt;code&gt;REAL&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Implicit casts from &lt;code&gt;INTEGER&lt;/code&gt;, &lt;code&gt;FLOAT&lt;/code&gt;, and &lt;code&gt;NUMERIC&lt;/code&gt; to &lt;code&gt;VARCHAR&lt;/code&gt; are not supported. If you need that functionality, write an explicit cast using one of the following forms:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CAST(&lt;span class=&#34;code-variable&#34;&gt;numeric-expression&lt;/span&gt; AS &lt;span class=&#34;code-variable&#34;&gt;data-type&lt;/span&gt;)
&lt;span class=&#34;code-variable&#34;&gt;numeric-expression&lt;/span&gt;::&lt;span class=&#34;code-variable&#34;&gt;data-type&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For example, you can cast a float to an integer as follows:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT(FLOAT &amp;#39;123.5&amp;#39;)::INT;
 ?column?
----------
      124
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;String-to-numeric data type conversions accept formats of quoted constants for scientific notation, binary scaling, hexadecimal, and combinations of numeric-type literals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Scientific notation&lt;code&gt;:&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT FLOAT &amp;#39;1e10&amp;#39;;
  ?column?
-------------
 10000000000
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;BINARY&lt;/code&gt; scaling&lt;code&gt;:&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NUMERIC &amp;#39;1p10&amp;#39;;
 ?column?
----------
     1024
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;hexadecimal:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NUMERIC &amp;#39;0x0abc&amp;#39;;
 ?column?
----------
     2748
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;


      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Spatial data types</title>
      <link>/en/sql-reference/data-types/spatial-data-types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/spatial-data-types/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database supports two spatial data types. These data types store two- and three-dimensional spatial objects in a table column:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GEOMETRY&lt;/code&gt;: Spatial object with coordinates expressed as (&lt;em&gt;x&lt;/em&gt;,&lt;em&gt;y&lt;/em&gt;) pairs, defined in the Cartesian plane. All calculations use Cartesian coordinates.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;GEOGRAPHY&lt;/code&gt;: Spatial object defined as on the surface of a perfect sphere, or a spatial object in the WGS84 coordinate system. Coordinates are expressed in longitude/latitude angular values, measured in degrees. All calculations are in meters. For perfect sphere calculations, the sphere has a radius of 6371 kilometers, which approximates the shape of the earth.

&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;

Some spatial programs use an ellipsoid to model the earth, resulting in slightly different data.

&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The maximum size of a &lt;code&gt;GEOMETRY&lt;/code&gt; or &lt;code&gt;GEOGRAPHY&lt;/code&gt; data type is 10,000,000 bytes (10 MB). You cannot use either data type as a table&#39;s primary key.&lt;/p&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;GEOMETRY [ (&lt;span class=&#34;code-variable&#34;&gt;length&lt;/span&gt;) ]
GEOGRAPHY [ (&lt;span class=&#34;code-variable&#34;&gt;length&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;length&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The maximum amount of spatial data that a &lt;code&gt;GEOMETRY&lt;/code&gt; or &lt;code&gt;GEOGRAPHY&lt;/code&gt; column can store, up to 10 MB.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1 MB&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: UUID data type</title>
      <link>/en/sql-reference/data-types/uuid-data-type/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/uuid-data-type/</guid>
      <description>
        
        
        &lt;p&gt;Stores universally unique identifiers (UUIDs). UUIDs are 16-byte (128-bit) numbers used to uniquely identify records. To generate UUIDs, OpenText™ Analytics Database provides the function 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/data-type-specific-functions/uuid-functions/uuid-generate/#&#34;&gt;UUID_GENERATE&lt;/a&gt;&lt;/code&gt;, which returns UUIDs based on high-quality randomness from &lt;code&gt;/dev/urandom&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;UUID
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;uuid-input-and-output-formats&#34;&gt;UUID input and output formats&lt;/h2&gt;
&lt;p&gt;UUIDs support input of case-insensitive string literal formats, as specified by &lt;a href=&#34;https://tools.ietf.org/html/rfc4122&#34;&gt;RFC 4122&lt;/a&gt;. In general, a UUID is written as a sequence of hexadecimal digits, in several groups optionally separated by hyphens, for a total of 32 digits representing 128 bits.&lt;/p&gt;
&lt;p&gt;The following input formats are valid:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;6bbf0744-74b4-46b9-bb05-53905d4538e7
{6bbf0744-74b4-46b9-bb05-53905d4538e7}
6BBF074474B446B9BB0553905D4538E7
6BBf-0744-74B4-46B9-BB05-5390-5D45-38E7
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On output, the database uses the following format:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For example, the following table defines column &lt;code&gt;cust_id&lt;/code&gt; as a UUID:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE public.Customers
(
    cust_id uuid,
    lname varchar(36),
    fname varchar(24)
);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following input for &lt;code&gt;cust_id&lt;/code&gt; uses several valid formats:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  COPY Customers FROM STDIN;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; {cede66b7-3d29-4da6-b700-871fc0ac57be}|Kearney|Thomas
&amp;gt;&amp;gt; 34462732ed5649838f3be735b0c32d50|Pham|Duc
&amp;gt;&amp;gt; 9fb0-1de0-1d63-4d09-9415-90e0-b4e9-3b9a|Steinberg|Jeremy
&amp;gt;&amp;gt; \.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On querying this table, the database formats all &lt;code&gt;cust_id&lt;/code&gt; data in the same way:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT cust_id, fname, lname FROM Customers;
                cust_id                | fname  |   lname
--------------------------------------+--------+-----------
 9fb01de0-1d63-4d09-9415-90e0b4e93b9a | Jeremy | Steinberg
 34462732-ed56-4983-8f3b-e735b0c32d50 | Duc    | Pham
 cede66b7-3d29-4da6-b700-871fc0ac57be | Thomas | Kearney
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;generating-uuids&#34;&gt;Generating UUIDs&lt;/h2&gt;
&lt;p&gt;You can use the database function 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/data-type-specific-functions/uuid-functions/uuid-generate/#&#34;&gt;UUID_GENERATE&lt;/a&gt;&lt;/code&gt; to automatically generate UUIDs that uniquely identify table records. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; INSERT INTO Customers SELECT UUID_GENERATE(),&amp;#39;Rostova&amp;#39;,&amp;#39;Natasha&amp;#39;;
 OUTPUT
--------
      1
(1 row)

=&amp;gt; COMMIT;
COMMIT
=&amp;gt; SELECT cust_id, fname, lname FROM Customers;
               cust_id                |  fname  |   lname
--------------------------------------+---------+-----------
 9fb01de0-1d63-4d09-9415-90e0b4e93b9a | Jeremy  | Steinberg
 34462732-ed56-4983-8f3b-e735b0c32d50 | Duc     | Pham
 cede66b7-3d29-4da6-b700-871fc0ac57be | Thomas  | Kearney
 9aad6757-fe1b-473a-a109-b89b7b358c69 | Natasha | Rostova
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;null-input-and-output&#34;&gt;NULL input and output&lt;/h2&gt;
&lt;p&gt;The following string is reserved as NULL for UUID columns:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;00000000-0000-0000-0000-000000000000
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The database always renders NULL as blank.&lt;/p&gt;
&lt;p&gt;The following &lt;code&gt;COPY&lt;/code&gt; statements insert NULL values into the UUID column, explicitly and implicitly:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  COPY Customers FROM STDIN NULL AS &amp;#39;null&amp;#39;;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; null|Doe|Jane
&amp;gt;&amp;gt; 00000000-0000-0000-0000-000000000000|Man|Nowhere
&amp;gt;&amp;gt; \.
=&amp;gt;  COPY Customers FROM STDIN;
&amp;gt;&amp;gt; |Doe|John
&amp;gt;&amp;gt; \.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In all cases, the database renders NULL as blank:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT cust_id, fname, lname FROM Customers WHERE cust_id IS NULL;
 cust_id |  fname  | lname
---------+---------+-------
         | Nowhere | Man
         | Jane    | Doe
         | John    | Doe
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;usage-restrictions&#34;&gt;Usage restrictions&lt;/h2&gt;
&lt;p&gt;UUID data types only support relational operators and functions that are also supported by CHAR and VARCHAR data types—for example, 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/min-aggregate/#&#34;&gt;MIN&lt;/a&gt;&lt;/code&gt;, 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/max-aggregate/#&#34;&gt;MAX&lt;/a&gt;&lt;/code&gt;, and 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/count-aggregate/#&#34;&gt;COUNT&lt;/a&gt;&lt;/code&gt;. UUID data types do not support mathematical operators or functions, such as 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/sum-aggregate/#&#34;&gt;SUM&lt;/a&gt;&lt;/code&gt; and 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/aggregate-functions/avg-aggregate/#&#34;&gt;AVG&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Data type coercion</title>
      <link>/en/sql-reference/data-types/data-type-coercion/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/data-type-coercion/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database supports two types of data type casting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Implicit casting&lt;/em&gt;: The expression automatically converts the data from one type to another.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Explicit casting&lt;/em&gt;: A SQL statement specifies the target data type for the conversion.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;implicit-casting&#34;&gt;Implicit casting&lt;/h2&gt;
&lt;p&gt;The ANSI SQL-92 standard supports implicit casting among similar data types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Number types&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CHAR, VARCHAR, LONG VARCHAR&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;BINARY, VARBINARY, LONG VARBINARY&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The database supports two types of nonstandard implicit casts of scalar types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;From CHAR to FLOAT, to match the one from VARCHAR to FLOAT. The following example converts the CHAR &lt;code&gt;&#39;3&#39;&lt;/code&gt; to a FLOAT so it can add the number 4.33 to the FLOAT result of the second expression:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT &amp;#39;3&amp;#39;::CHAR + 4.33::FLOAT;
 ?column?
----------
   7.33
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Between DATE and TIMESTAMP. The following example DATE to a TIMESTAMP and calculates the time 6 hours, 6 minutes, and 6 seconds back from 12:00 AM:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DATE(&amp;#39;now&amp;#39;) - INTERVAL &amp;#39;6:6:6&amp;#39;;
      ?column?
---------------------
 2013-07-30 17:53:54
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When there is no ambiguity about the data type of an expression value, it is implicitly coerced to match the expected data type. In the following statement, the quoted string constant &#39;&lt;code&gt;2&lt;/code&gt;&#39; is implicitly coerced into an INTEGER value so that it can be the operand of an arithmetic operator (addition):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT 2 + &amp;#39;2&amp;#39;;
 ?column?
----------
        4
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A concatenate operation explicitly takes arguments of any data type. In the following example, the concatenate operation implicitly coerces the arithmetic expression &lt;code&gt;2 + 2&lt;/code&gt; and the INTEGER constant &lt;code&gt;2&lt;/code&gt; to VARCHAR values so that they can be concatenated.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT 2 + 2 || 2;
 ?column?
----------
 42
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Another example is to first get today&#39;s date:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DATE &amp;#39;now&amp;#39;;
  ?column?
------------
 2013-07-31
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following command converts DATE to a TIMESTAMP and adds a day and a half to the results by using INTERVAL:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DATE &amp;#39;now&amp;#39; + INTERVAL &amp;#39;1 12:00:00&amp;#39;;
      ?column?
---------------------
 2013-07-31 12:00:00
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Most implicit casts stay within their relational family and go in one direction, from less detailed to more detailed. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;DATE to TIMESTAMP/TZ&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;INTEGER to NUMERIC to FLOAT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CHAR to FLOAT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CHAR to VARCHAR&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CHAR and/or VARCHAR to FLOAT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CHAR to LONG VARCHAR&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VARCHAR to LONG VARCHAR&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;BINARY to VARBINARY&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;BINARY to LONG VARBINARY&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VARBINARY to LONG VARBINARY&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More specifically, data type coercion works in this manner:

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



&lt;tr&gt; 

&lt;th &gt;
Conversion&lt;/th&gt; 

&lt;th &gt;
Notes&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
INT8 &amp;gt; FLOAT8&lt;/td&gt; 

&lt;td &gt;


Implicit, can lose significance&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
FLOAT8 &amp;gt; INT8&lt;/td&gt; 

&lt;td &gt;


Explicit, rounds&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VARCHAR &amp;lt;-&amp;gt; CHAR&lt;/td&gt; 

&lt;td &gt;


Implicit, adjusts trailing spaces&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VARBINARY &amp;lt;-&amp;gt; BINARY&lt;/td&gt; 

&lt;td &gt;


Implicit, adjusts trailing NULs&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

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

&lt;td &gt;


Implicit, adjusts trailing spaces&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VARBINARY &amp;gt; LONG VARBINARY&lt;/td&gt; 

&lt;td &gt;


Implicit, adjusts trailing NULs&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;No other types cast to or from LONGVARBINARY, VARBINARY, or BINARY. In the following list, &amp;lt;any&amp;gt; means one these types: INT8, FLOAT8, DATE, TIME, TIMETZ, TIMESTAMP, TIMESTAMPTZ, INTERVAL:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;any&amp;gt; -&amp;gt; VARCHAR—implicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VARCHAR -&amp;gt; &amp;lt;any&amp;gt;—explicit, except that VARCHAR-&amp;gt;FLOAT is implicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;any&amp;gt; &amp;lt;-&amp;gt; CHAR—explicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DATE -&amp;gt; TIMESTAMP/TZ—implicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIMESTAMP/TZ -&amp;gt; DATE—explicit, loses time-of-day&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIME -&amp;gt; TIMETZ—implicit, adds local timezone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIMETZ -&amp;gt; TIME—explicit, loses timezone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIME -&amp;gt; INTERVAL—implicit, day to second with days=0&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;INTERVAL -&amp;gt; TIME—explicit, truncates non-time parts&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIMESTAMP &amp;lt;-&amp;gt; TIMESTAMPTZ—implicit, adjusts to local timezone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIMESTAMP/TZ -&amp;gt; TIME—explicit, truncates non-time parts&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIMESTAMPTZ -&amp;gt; TIMETZ—explicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VARBINARY -&amp;gt; LONG VARBINARY—implicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;LONG VARBINARY -&amp;gt; VARBINARY—explicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VARCHAR -&amp;gt; LONG VARCHAR—implicit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;LONG VARCHAR -&amp;gt; VARCHAR—explicit&lt;/p&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;
&lt;p&gt;Implicit casts from INTEGER, FLOAT, and NUMERIC to VARCHAR are not supported. If you need that functionality, write an explicit cast:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CAST(x AS data-type-name)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;or&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;x::data-type-name
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following example casts a FLOAT to an INTEGER:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT(FLOAT &amp;#39;123.5&amp;#39;)::INT;
 ?column?
----------
      124
(1 row)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;String-to-numeric data type conversions accept formats of quoted constants for scientific notation, binary scaling, hexadecimal, and combinations of numeric-type literals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Scientific notation&lt;code&gt;:&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT FLOAT &amp;#39;1e10&amp;#39;;
  ?column?
-------------
 10000000000
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;BINARY&lt;/code&gt; scaling&lt;code&gt;:&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NUMERIC &amp;#39;1p10&amp;#39;;
 ?column?
----------
     1024
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;hexadecimal:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NUMERIC &amp;#39;0x0abc&amp;#39;;
 ?column?
----------
     2748
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;complex-types&#34;&gt;Complex types&lt;/h2&gt;
&lt;p&gt;Collections (&lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/array/&#34;&gt;arrays&lt;/a&gt; and &lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/set/&#34;&gt;sets&lt;/a&gt;) can be cast implicitly and explicitly. Casting a collection casts each element of the collection. You can, for example, cast an ARRAY[VARCHAR] to an ARRAY[INT] or a SET[DATE] to SET[TIMESTAMPTZ]. You can cast between arrays and sets.&lt;/p&gt;
&lt;p&gt;When casting to a bounded native array, inputs that are too long are truncated. When casting to a non-native array (an array containing complex data types including other arrays), if the new bounds are too small for the data the cast fails&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/data-types/complex-types/row/&#34;&gt;Rows&lt;/a&gt; (structs) can be cast implicitly and explicitly. Casting a ROW casts each field value. You can specify new field names in the cast or specify only the field types to use the existing field names.&lt;/p&gt;
&lt;p&gt;Casting can increase the storage needed for a column. For example, if you cast an array of INT to an array of VARCHAR(50), each element takes more space and thus the array takes more space. If the difference is extreme or the array has many elements, this could mean that the array no longer fits within the space allotted for the column. In this case the operation reports an error and fails.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example casts three strings as NUMERICs:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NUMERIC &amp;#39;12.3e3&amp;#39;, &amp;#39;12.3p10&amp;#39;::NUMERIC, CAST(&amp;#39;0x12.3p-10e3&amp;#39; AS NUMERIC);
 ?column? | ?column? |     ?column?
----------+----------+-------------------
    12300 |  12595.2 | 17.76123046875000
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This example casts a VARBINARY string into a LONG VARBINARY data type:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT B&amp;#39;101111000&amp;#39;::LONG VARBINARY;
 ?column?
----------
 \001x
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following example concatenates a CHAR with a LONG VARCHAR, resulting in a LONG VARCHAR:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \set s &amp;#39;&amp;#39;&amp;#39;&amp;#39;`cat longfile.txt`&amp;#39;&amp;#39;&amp;#39;&amp;#39;
=&amp;gt; SELECT length (&amp;#39;a&amp;#39; || :s ::LONG VARCHAR);
 length
----------
 65002
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following example casts a combination of NUMERIC and INTEGER data into a NUMERIC result:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT (18. + 3./16)/1024*1000;
                ?column?
-----------------------------------------
 17.761230468750000000000000000000000000
(1 row)
&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;

In SQL expressions, pure numbers between (–2^63–1) and (2^63–1) are INTEGERs. Numbers with decimal points are NUMERIC.

&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/data-types/data-type-coercion-chart/#&#34;&gt;Data type coercion chart&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/language-elements/operators/data-type-coercion-operators-cast/#&#34;&gt;Data type coercion operators (CAST)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Data type coercion chart</title>
      <link>/en/sql-reference/data-types/data-type-coercion-chart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/data-type-coercion-chart/</guid>
      <description>
        
        
        &lt;h2 id=&#34;conversion-types&#34;&gt;Conversion types&lt;/h2&gt;
&lt;p&gt;The following table defines all possible type conversions that OpenText™ Analytics Database supports. The data types in the first column of the table are the inputs to convert, and the remaining columns indicate the result for the different conversion types.

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



&lt;tr&gt; 

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

&lt;th &gt;
Implicit&lt;/th&gt; 

&lt;th &gt;
Explicit&lt;/th&gt; 

&lt;th &gt;
Assignment&lt;/th&gt; 

&lt;th &gt;
Assignment without numeric meaning&lt;/th&gt; 

&lt;th &gt;
Conversion without explicit casting&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
BOOLEAN&lt;/td&gt; 

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

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

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

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

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

&lt;tr&gt; 

&lt;td &gt;
INTEGER&lt;/td&gt; 

&lt;td &gt;
BOOLEAN, NUMERIC, FLOAT&lt;/td&gt; 

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

&lt;td &gt;
INTERVAL DAY/SECOND, INTERVAL YEAR/MONTH&lt;/td&gt; 

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

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

&lt;tr&gt; 

&lt;td &gt;
NUMERIC&lt;/td&gt; 

&lt;td &gt;
FLOAT&lt;/td&gt; 

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

&lt;td &gt;
INTEGER&lt;/td&gt; 

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

&lt;td &gt;
NUMERIC&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
FLOAT&lt;/td&gt; 

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

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

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

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

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

&lt;tr&gt; 

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

&lt;td &gt;
FLOAT, CHAR&lt;/td&gt; 

&lt;td &gt;
BOOLEAN, INTEGER, NUMERIC, VARCHAR, TIMESTAMP, TIMESTAMPTZ, DATE, TIME, TIMETZ, INTERVAL DAY/SECOND, INTERVAL YEAR/MONTH, LONG VARBINARY&lt;/td&gt; 

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

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

&lt;td &gt;


&lt;code&gt;LONG VARCHAR&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VARCHAR&lt;/td&gt; 

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

&lt;td &gt;
BOOLEAN, INTEGER, NUMERIC, TIMESTAMP, TIMESTAMPTZ, DATE, TIME, TIMETZ, UUID, BINARY, VARBINARY, INTERVAL DAY/SECOND, INTERVAL YEAR/MONTH&lt;/td&gt; 

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

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

&lt;td &gt;
VARCHAR&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
CHAR&lt;/td&gt; 

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

&lt;td &gt;
BOOLEAN, INTEGER, NUMERIC, TIMESTAMP, TIMESTAMPTZ, DATE, TIME, TIMETZ, UUID (CHAR length ≥ 36), BINARY, VARBINARY, INTERVAL DAY/SECOND, INTERVAL YEAR/MONTH&lt;/td&gt; 

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

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

&lt;td &gt;
CHAR&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
TIMESTAMP&lt;/td&gt; 

&lt;td &gt;
TIMESTAMPTZ&lt;/td&gt; 

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

&lt;td &gt;
LONG CHAR, VARCHAR, CHAR, DATE, TIME&lt;/td&gt; 

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

&lt;td &gt;
TIMESTAMP&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
TIMESTAMPTZ&lt;/td&gt; 

&lt;td &gt;
TIMESTAMP&lt;/td&gt; 

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

&lt;td &gt;
LONG CHAR, VARCHAR, CHAR, DATE, TIME, TIMETZ&lt;/td&gt; 

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

&lt;td &gt;
TIMESTAMPTZ&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

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

&lt;td &gt;
TIMESTAMP&lt;/td&gt; 

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

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

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

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

&lt;tr&gt; 

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

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

&lt;td &gt;
TIMESTAMP, TIMESTAMPTZ, INTERVAL DAY/SECOND&lt;/td&gt; 

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

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

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

&lt;tr&gt; 

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

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

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

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

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

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

&lt;tr&gt; 

&lt;td &gt;
INTERVAL DAY/SECOND&lt;/td&gt; 

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

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

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

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

&lt;td &gt;
INTERVAL DAY/SECOND&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
INTERVAL YEAR/MONTH&lt;/td&gt; 

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

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

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

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

&lt;td &gt;
INTERVAL YEAR/MONTH&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

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

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

&lt;td &gt;
VARBINARY&lt;/td&gt; 

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

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

&lt;td &gt;
LONG VARBINARY&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VARBINARY&lt;/td&gt; 

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

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

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

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

&lt;td &gt;
VARBINARY&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

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

&lt;td &gt;
VARBINARY&lt;/td&gt; 

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

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

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

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

&lt;tr&gt; 

&lt;td &gt;
UUID&lt;/td&gt; 

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

&lt;td &gt;
CHAR(36), VARCHAR&lt;/td&gt; 

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

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

&lt;td &gt;
UUID&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;implicit-and-explicit-conversion&#34;&gt;Implicit and explicit conversion&lt;/h2&gt;
&lt;p&gt;OpenText™ Analytics Database supports data type conversion of values without explicit casting, such as &lt;code&gt;NUMERIC(10,6) -&amp;gt; NUMERIC(18,4)&lt;/code&gt;.Implicit data type conversion occurs automatically when converting values of different, but compatible, types to the target column&#39;s data type. For example, when adding values, (&lt;code&gt;INTEGER + NUMERIC&lt;/code&gt;), the result is implicitly cast to a &lt;code&gt;NUMERIC&lt;/code&gt; type to accommodate the prominent type in the statement. Depending on the input data types, different precision and scale can occur.&lt;/p&gt;
&lt;p&gt;An explicit type conversion must occur when the source data cannot be cast implicitly to the target column&#39;s data type.&lt;/p&gt;
&lt;h2 id=&#34;assignment-conversion&#34;&gt;Assignment conversion&lt;/h2&gt;
&lt;p&gt;In data assignment conversion, coercion implicitly occurs when values are assigned to database columns in an &lt;code&gt;INSERT&lt;/code&gt; or &lt;code&gt;UPDATE...SET&lt;/code&gt; statement. For example, in a statement that includes &lt;code&gt;INSERT...VALUES(&#39;2.5&#39;)&lt;/code&gt;, where the target column data type is &lt;code&gt;NUMERIC(18,5)&lt;/code&gt;, a cast from &lt;code&gt;VARCHAR&lt;/code&gt; to the column data type is inferred.&lt;/p&gt;
&lt;p&gt;In an assignment without numeric meaning, the value is subject to CHAR/VARCHAR/LONG VARCHAR comparisons.&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/data-types/data-type-coercion/#&#34;&gt;Data type coercion&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/language-elements/operators/data-type-coercion-operators-cast/#&#34;&gt;Data type coercion operators (CAST)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Complex types</title>
      <link>/en/sql-reference/data-types/complex-types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/complex-types/</guid>
      <description>
        
        
        &lt;p&gt;Complex types such as structures (also known as rows), arrays, and maps are composed of primitive types and sometimes other complex types. Complex types can be used in the following ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Arrays and rows (in any combination) can be used as column data types in both native and external tables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sets of primitive element types can be used as column data types in native and external tables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Arrays and rows, but not combinations of them, can be created as literals, for example to use in query expressions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;span class=&#34;sql&#34;&gt;MAP&lt;/span&gt; type is a legacy type. To represent maps, use &lt;span class=&#34;sql&#34;&gt;ARRAY[ROW]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;If a flex table has a real column that uses a complex type, the values from that column are not included in the &lt;code&gt;__raw__&lt;/code&gt; column. For more information, see &lt;a href=&#34;../../../en/flex-tables/bulk-loading-data-into-flex-tables/#Loading&#34;&gt;Loading Data into Flex Table Real Columns&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Data type mappings between OpenText Analytics Database and Oracle</title>
      <link>/en/sql-reference/data-types/data-type-mappings-between-and-oracle/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/data-types/data-type-mappings-between-and-oracle/</guid>
      <description>
        
        
        &lt;p&gt;Oracle uses proprietary data types for all main data types, such as VARCHAR, INTEGER, FLOAT, DATE. Before migrating a database from Oracle to OpenText™ Analytics Database, first convert the schema to minimize errors and time spent fixing erroneous data issues.&lt;/p&gt;
&lt;p&gt;The following table compares the behavior of Oracle data types to OpenText™ Analytics Database data types.

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



&lt;tr&gt; 

&lt;th &gt;
Oracle&lt;/th&gt; 

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

&lt;th &gt;
Notes&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td  rowspan=&#34;3&#34; &gt;




&lt;p&gt;&lt;a name=&#34;NUMBER&#34;&gt;&lt;/a&gt;NUMBER&lt;/p&gt;
&lt;p&gt;(no explicit precision)&lt;/p&gt;
&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/integer/#&#34;&gt;INTEGER&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;








&lt;p&gt;In Oracle, the NUMBER data type with no explicit precision stores each number &lt;em&gt;N&lt;/em&gt; as an integer &lt;em&gt;M&lt;/em&gt;, together with a scale S. The scale can range from -84 to 127, while the precision of &lt;em&gt;M&lt;/em&gt; is limited to 38 digits. Thus:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;N&lt;/em&gt; = &lt;em&gt;M&lt;/em&gt; * 10&lt;sup&gt;^&lt;/sup&gt;&lt;em&gt;S&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When precision is specified, precision/scale applies to all entries in the column. If omitted, the scale defaults to 0.&lt;/p&gt;
&lt;p&gt;For the common case—Oracle NUMBER with no explicit precision used to store only integer values—the database INTEGER data type is the most appropriate and the fastest equivalent data type. However, INTEGER is limited to a little less than 19 digits, with a scale of 0: &lt;code&gt;[-9223372036854775807, +9223372036854775807]&lt;/code&gt;.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/numeric/#&#34;&gt;NUMERIC&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;













&lt;p&gt;If an Oracle column contains integer values outside of the range &lt;code&gt;[-9223372036854775807, +9223372036854775807]&lt;/code&gt;, then use the database data type NUMERIC(&lt;em&gt;p&lt;/em&gt;,0) where &lt;em&gt;p&lt;/em&gt; is the maximum number of digits required to represent values of the source data.&lt;/p&gt;
&lt;p&gt;If the data is exact with fractional places—such as dollars, OpenText recommends that you use NUMERIC(&lt;em&gt;p&lt;/em&gt;,&lt;em&gt;s&lt;/em&gt;) where &lt;em&gt;p&lt;/em&gt; is the precision (total number of digits) and &lt;em&gt;s&lt;/em&gt; is the maximum scale (number of decimal places).&lt;/p&gt;
&lt;p&gt;The database conforms to standard SQL, which requires that &lt;em&gt;p&lt;/em&gt; ≥ s and &lt;em&gt;s&lt;/em&gt; ≥ 0. The NUMERIC data type is most effective for &lt;em&gt;p&lt;/em&gt;=18 and increasingly expensive for &lt;em&gt;p&lt;/em&gt;=37, 58, 67, etc., where &lt;em&gt;p&lt;/em&gt; ≤ 1024.&lt;/p&gt;
&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;
&lt;p&gt;OpenText recommends against using the data type NUMERIC(38,&lt;em&gt;s&lt;/em&gt;) as a default &amp;quot;failsafe&amp;quot; mapping to ensure no loss of precision. NUMERIC(18,&lt;em&gt;s&lt;/em&gt;) is better and INTEGER or FLOAT are even better options, if one of these data types are suitable for the task.&lt;/p&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/double-precision-float/&#34;&gt;FLOAT&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;
Even though no explicit scale is specified for an Oracle NUMBER column, Oracle allows non-integer values, each with its own scale. If the data stored in the column is approximate, OpenText recommends that you use the FLOAT data type, which is standard IEEE floating point, like ORACLE BINARY_DOUBLE.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;




&lt;p&gt;NUMBER(&lt;em&gt;P&lt;/em&gt;,0)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;P&lt;/em&gt; ≤ 18&lt;/p&gt;
&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/integer/#&#34;&gt;INTEGER&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;


For Oracle NUMBER data types with 0 scale and a precision less than or equal to 18, use the OpenText™ Analytics Database INTEGER data type.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;




&lt;p&gt;NUMBER(&lt;em&gt;P&lt;/em&gt;,0)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;P&lt;/em&gt; &amp;gt; 18&lt;/p&gt;
&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/numeric/#&#34;&gt;NUMERIC&lt;/a&gt;(&lt;em&gt;p&lt;/em&gt;,0)&lt;/td&gt; 

&lt;td &gt;


In the rare case where a Oracle column specifies precision greater than 18, use the OpenText™ Analytics Database data type NUMERIC(&lt;em&gt;p&lt;/em&gt;, 0), where &lt;em&gt;p&lt;/em&gt; = &lt;em&gt;P&lt;/em&gt;.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td  rowspan=&#34;2&#34; &gt;




&lt;p&gt;NUMBER(&lt;em&gt;P&lt;/em&gt;,&lt;em&gt;S&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;All cases other than above&lt;/p&gt;
&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/numeric/#&#34;&gt;NUMERIC&lt;/a&gt;(&lt;em&gt;p&lt;/em&gt;,&lt;em&gt;s&lt;/em&gt;)&lt;/td&gt; 

&lt;td  rowspan=&#34;2&#34; &gt;




&lt;ul&gt;
&lt;li&gt;When &lt;em&gt;P&lt;/em&gt; ≥ &lt;em&gt;S&lt;/em&gt; and &lt;em&gt;S&lt;/em&gt; ≥ 0, use &lt;em&gt;p&lt;/em&gt; = &lt;em&gt;P&lt;/em&gt; and &lt;em&gt;s&lt;/em&gt; = &lt;em&gt;S&lt;/em&gt;, unless the data allows reducing &lt;em&gt;P&lt;/em&gt; or using FLOAT as discussed above.&lt;/li&gt;
&lt;li&gt;If &lt;em&gt;S&lt;/em&gt; &amp;gt; &lt;em&gt;P&lt;/em&gt;, use &lt;em&gt;p&lt;/em&gt; = &lt;em&gt;S&lt;/em&gt;, &lt;em&gt;s&lt;/em&gt; = &lt;em&gt;S&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;If &lt;em&gt;S&lt;/em&gt; &amp;lt; 0, use &lt;em&gt;p&lt;/em&gt; = &lt;em&gt;P&lt;/em&gt; – S, &lt;em&gt;s&lt;/em&gt; = 0.&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/double-precision-float/&#34;&gt;FLOAT&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


NUMERIC(&lt;em&gt;P&lt;/em&gt;,&lt;em&gt;S&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;

&lt;/td&gt; 

&lt;td &gt;


Rarely used in Oracle, see notes for Oracle &lt;a href=&#34;#NUMBER&#34;&gt;NUMBER&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


DECIMAL(&lt;em&gt;P&lt;/em&gt;,&lt;em&gt;S&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;

&lt;/td&gt; 

&lt;td &gt;


Synonym for Oracle NUMERIC.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


BINARY_FLOAT&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/double-precision-float/&#34;&gt;FLOAT&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;


Same as FLOAT(53) or DOUBLE PRECISION&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


BINARY_DOUBLE&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/numeric-data-types/double-precision-float/&#34;&gt;FLOAT&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;


Same as FLOAT(53) or DOUBLE PRECISION&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


RAW&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;VARBINARY&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;






&lt;p&gt;Maximum sizes compared:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Oracle RAW data type: 2000 bytes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OpenText™ Analytics Database VARBINARY: 65000 bytes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


LONG RAW&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;LONG VARBINARY&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;














&lt;p&gt;Maximum sizes compared:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Oracle’s LONG RAW is 2GB&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OpenText™ Analytics Database LONG VARBINARY is 32M bytes/octets (~30MB)&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;
&lt;p&gt;Be careful to avoid truncation when migrating Oracle LONG RAW data to OpenText™ Analytics Database.&lt;/p&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


CHAR(&lt;em&gt;n&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/character-data-types-char-and-varchar/&#34;&gt;CHAR&lt;/a&gt;(&lt;em&gt;n&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;






&lt;p&gt;Maximum sizes compared:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Oracle CHAR: 2000 bytes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OpenText™ Analytics Database CHAR : 65000 bytes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


&lt;a name=&#34;NCHAR&#34;&gt;&lt;/a&gt;NCHAR(&lt;em&gt;n&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/character-data-types-char-and-varchar/&#34;&gt;CHAR&lt;/a&gt;(*n**3)&lt;/td&gt; 

&lt;td &gt;


OpenText™ Analytics Database supports national characters with CHAR(&lt;em&gt;n&lt;/em&gt;) as variable-length UTF8-encoded UNICODE character string. UTF-8 represents ASCII in 1 byte, most European characters in 2 bytes, and most oriental and Middle Eastern characters in 3 bytes.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


VARCHAR2(&lt;em&gt;n&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;VARCHAR&lt;/a&gt;(&lt;em&gt;n&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;

















&lt;p&gt;Maximum sizes compared:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Oracle VARCHAR2: 4000 bytes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OpenText™ Analytics Database VARCHAR: 65000 bytes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&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;
&lt;p&gt;The Oracle VARCHAR2 and OpenText™ Analytics Database VARCHAR data types are semantically different:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VARCHAR exhibits standard SQL behavior&lt;/li&gt;
&lt;li&gt;VARCHAR2 is inconsistent with standard SQL behavior in that it treats an empty string as NULL value, and uses non-padded comparison if one operand is VARCHAR2.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


NVARCHAR2(&lt;em&gt;n&lt;/em&gt;)&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;VARCHAR&lt;/a&gt;(*n**3)&lt;/td&gt; 

&lt;td &gt;


See notes for &lt;a href=&#34;#NCHAR&#34;&gt;NCHAR&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td  rowspan=&#34;2&#34; &gt;


DATE&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/timestamptimestamptz/&#34;&gt;TIMESTAMP&lt;/a&gt;&lt;/td&gt; 

&lt;td  rowspan=&#34;2&#34; &gt;


Oracle’s DATE is different from the SQL standard DATE data type implemented by OpenText™ Analytics Database. Oracle’s DATE includes the time (no fractional seconds), while OpenText™ Analytics Database DATE data types include only date as per the SQL standard.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/date/#&#34;&gt;DATE&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


TIMESTAMP&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/timestamptimestamptz/&#34;&gt;TIMESTAMP&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;


TIMESTAMP defaults to six places—that is, to microseconds.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


TIMESTAMP WITH TIME ZONE&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/timestamptimestamptz/&#34;&gt;TIMESTAMP WITH TIME ZONE&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;


TIME ZONE defaults to the currently SET or system time zone.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


INTERVAL YEAR TO MONTH&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/interval/&#34;&gt;INTERVAL YEAR TO MONTH&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;


As per the SQL standard, you can qualify OpenText™ Analytics Database INTERVAL data types with the YEAR TO MONTH subtype.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


INTERVAL DAY TO SECOND&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/datetime-data-types/interval/&#34;&gt;INTERVAL DAY TO SECOND&lt;/a&gt;&lt;/td&gt; 

&lt;td &gt;


The default subtype for OpenText™ Analytics Database INTERVAL data types is DAY TO SECOND.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


CLOB&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;LONG VARCHAR&lt;/a&gt;&lt;/td&gt; 

&lt;td  rowspan=&#34;2&#34; &gt;




&lt;p&gt;You can store a CLOB (character large object) or BLOB (binary large object) value in a table or in an external location. The maximum size of a CLOB or BLOB is 128 TB.&lt;/p&gt;
&lt;p&gt;You can store OpenText™ Analytics Database LONG data types only in LONG VARCHAR and LONG VARBINARY columns. The maximum size of LONG data types is 32M bytes.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
BLOB&lt;/td&gt; 

&lt;td &gt;
&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;LONG VARBINARY&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


LONG&lt;/td&gt; 

&lt;td &gt;


&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;LONG VARCHAR&lt;/a&gt;&lt;/td&gt; 

&lt;td  rowspan=&#34;2&#34; &gt;




&lt;p&gt;Oracle recommends using CLOB and BLOB data types instead of LONG and LONG RAW data types.&lt;/p&gt;
&lt;p&gt;An Oracle table can contain only one LONG column, The maximum size of a LONG or LONG RAW data type is 2 GB.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
LONG RAW&lt;/td&gt; 

&lt;td &gt;
&lt;a href=&#34;../../../en/sql-reference/data-types/long-data-types/&#34;&gt;LONG VARBINARY&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;

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