insert

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

insert [2015/09/23 20:27]
127.0.0.1 external edit
insert [2016/03/08 06:34] (current)
dmtolpeko
Line 1: Line 1:
-====== INSERT Statement ​- PL/​HQL ​======+====== INSERT Statement ======
  
 INSERT statement inserts rows into a table. INSERT statement inserts rows into a table.
Line 21: Line 21:
 ===== INSERT VALUES ===== ===== INSERT VALUES =====
  
-PL/HQL provides you with two options to run INSERT VALUES statement: **native** and **select**.+HPL/SQL provides you with two options to run INSERT VALUES statement: **native** and **select**.
  
-Use the [[configuration#​plhqlinsertvalues|plhql.insert.values]] option to define how to handle INSERT VALUES statement, the default value is **native**.+Use the [[configuration#​hplsqlinsertvalues|hplsql.insert.values]] option to define how to handle INSERT VALUES statement, the default value is **native**.
  
 ==== Native INSERT VALUES ==== ==== Native INSERT VALUES ====
  
-If [[configuration#​plhqlinsertvalues|plhql.insert.values]] is set to **native** ​PL/HQL relies on the database that must support INSERT VALUES syntax. Note that INSERT VALUES is available in Hive since version 0.14 only and can only be performed on tables that support ACID.+If [[configuration#​hplsqlinsertvalues|hplsql.insert.values]] is set to **native** ​HPL/SQL relies on the database that must support INSERT VALUES syntax. Note that INSERT VALUES is available in Hive since version 0.14 only and can only be performed on tables that support ACID.
  
 ==== Transform into INSERT SELECT ==== ==== Transform into INSERT SELECT ====
  
-If [[configuration#​plhqlinsertvalues|plhql.insert.values]] is set to **select** ​PL/HQL transforms VALUES clause to the list of SELECT FROM dual UNION ALL ... clauses.+If [[configuration#​hplsqlinsertvalues|hplsql.insert.values]] is set to **select** ​HPL/SQL transforms VALUES clause to the list of SELECT FROM dual UNION ALL ... clauses.
  
 For example, if you execute the following INSERT statement: For example, if you execute the following INSERT statement:
Line 43: Line 43:
 </​code>​ </​code>​
  
-PL/HQL transforms it to:+HPL/SQL transforms it to:
  
 <code language=sql>​ <code language=sql>​
Line 56: Line 56:
 </​code>​ </​code>​
  
-You can specify the single row, single column dual table using [[configuration#​plhqldualtable|plhql.dual.table]] option.+You can specify the single row, single column dual table using [[configuration#​hplsqldualtable|hplsql.dual.table]] option.
  
 **Important Note:** Such approach leads to creating one HDFS file **per** INSERT statement, and must not be used to insert large number of rows.  **Important Note:** Such approach leads to creating one HDFS file **per** INSERT statement, and must not be used to insert large number of rows. 
Line 62: Line 62:
 **Compatibility:​** Oracle, Microsoft SQL Server, IBM DB2, Teradata, PostgreSQL and MySQL **Compatibility:​** Oracle, Microsoft SQL Server, IBM DB2, Teradata, PostgreSQL and MySQL
  
-**Version**: ​PL/HQL 0.03+**Version**: ​HPL/SQL 0.3