Github user liuyu000 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655538 --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc --- @@ -3405,6 +3461,88 @@ DIFF2_I1TS --- 5 row(s) selected. ``` +<<< +[[emptyblob_function]] +== EMPTY_BLOB() Function + +[[syntax_descriptions_of_emptyblob_function]] +=== Syntax Descriptions of EMPTY_BLOB() Function + +The EMPTY_BLOB() function creates a dummy LOB handle with BLOB. + +This function can be used in INSERT or UPDATE statement, to initialize a LOB column or attribute to EMPTY. + +EMPTY_BLOB() function is a Trafodion SQL extension. + +For more information, see http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL Large Objects Guide]. + +``` +EMPTY_BLOB() +``` + +[[considerations_for_emptyblob_function]] +=== Considerations for EMPTY_BLOB() Function + +* If EMPTY_BLOB() is specified, then a dummy lob handle is created. + +** No data is associated with the empty LOBs yet, but these dummy LOB handles can later be used to populate with new LOB data. If the LOB had data previously associated with it, it will be erased. + +** The dummy LOB handle will get the same datatype as the underlying column. ++ +For example, if the LOB column was defined as `âEXTERNALâ` during table creation, then the LOB column gets that type. If itâs not defined, then it is considered as a regular LOB. + +* An empty LOB is distinct from a LOB containing a string of length zero or a null LOB. + +[[examples_of_emptyblob_function]] +=== Examples of EMPTY_BLOB() Function + +* This example uses the EMPTY_BLOB to insert an empty LOB and creates a dummy LOB handle. ++ +``` +insert into test1 values (1, empty_blob()); +``` + +<<< +[[emptyclob_function]] +== EMPTY_CLOB() Function + +[[syntax_descriptions_of_emptyclob_function]] +=== Syntax Descriptions of EMPTY_CLOB() Function + +The EMPTY_CLOB() function creates a dummy LOB handle with CLOB. + +This function can be used in INSERT or UPDATE statement, to initialize a LOB column or attribute to EMPTY. --- End diff -- "an INSERT or UPDATE statement" is preferable, thanks Dave. :)
---