Exasol User Manual Version 6.0.8
Total Page:16
File Type:pdf, Size:1020Kb
Exasol User Manual Version 6.0.8 Empowering analytics. Experience the world´s fastest, most intelligent, in-memory analytics database. Copyright © 2018 Exasol AG. All rights reserved. The information in this publication is subject to change without notice. EXASOL SHALL NOT BE HELD LIABLE FOR TECHNICAL OR EDITORIAL ERRORS OR OMISSIONS CONTAINED HEREIN NOR FOR ACCIDENTAL OR CONSEQUENTIAL DAMAGES RES- ULTING FROM THE FURNISHING, PERFORMANCE, OR USE OF. No part of this publication may be photocopied or reproduced in any form without prior written consent from Exasol. All named trademarks and registered trademarks are the property of their respective owners. Exasol User Manual Table of Contents Foreword ..................................................................................................................................... ix Conventions ................................................................................................................................. xi Changes in Version 6.0 ................................................................................................................. xiii 1. What is Exasol? .......................................................................................................................... 1 2. SQL reference ............................................................................................................................ 5 2.1. Basic language elements .................................................................................................... 5 2.1.1. Comments in SQL ................................................................................................. 5 2.1.2. SQL identi®er ....................................................................................................... 5 2.1.3. Regular expressions ............................................................................................... 7 2.2. SQL statements .............................................................................................................. 11 2.2.1. De®nition of the database (DDL) ............................................................................ 12 2.2.2. Manipulation of the database (DML) ....................................................................... 37 2.2.3. Access control using SQL (DCL) ............................................................................ 60 2.2.4. Query language (DQL) ......................................................................................... 72 2.2.5. Veri®cation of the data quality ................................................................................ 82 2.2.6. Other statements .................................................................................................. 87 2.3. Data types ................................................................................................................... 103 2.3.1. Overview of Exasol data types .............................................................................. 104 2.3.2. Data type details ................................................................................................. 104 2.3.3. Data type aliases ................................................................................................ 107 2.3.4. Type conversion rules .......................................................................................... 108 2.3.5. Default values .................................................................................................... 110 2.3.6. Identity columns ................................................................................................ 112 2.4. Geospatial data ............................................................................................................. 113 2.4.1. Geospatial objects .............................................................................................. 114 2.4.2. Geospatial functions ........................................................................................... 115 2.5. Literals ....................................................................................................................... 117 2.5.1. Numeric literals ................................................................................................. 118 2.5.2. Boolean literals .................................................................................................. 119 2.5.3. Date/Time literals ............................................................................................... 119 2.5.4. Interval literals ................................................................................................... 119 2.5.5. String literals ..................................................................................................... 121 2.5.6. NULL literal ..................................................................................................... 121 2.6. Format models ............................................................................................................. 121 2.6.1. Date/Time format models ..................................................................................... 122 2.6.2. Numeric format models ....................................................................................... 124 2.7. Operators .................................................................................................................... 126 2.7.1. Arithmetic Operators ........................................................................................... 127 2.7.2. Concatenation operator || ...................................................................................... 128 2.7.3. CONNECT BY Operators .................................................................................... 129 2.8. Predicates .................................................................................................................... 129 2.8.1. Introduction ...................................................................................................... 130 2.8.2. List of predicates ................................................................................................ 130 2.9. Built-in functions .......................................................................................................... 135 2.9.1. Scalar functions ................................................................................................. 136 2.9.2. Aggregate functions ............................................................................................ 140 2.9.3. Analytical functions ............................................................................................ 140 2.9.4. Alphabetical list of all functions ............................................................................ 143 3. Concepts ................................................................................................................................ 257 3.1. Transaction management ............................................................................................... 257 3.1.1. Basic concept .................................................................................................... 257 3.1.2. Differences to other systems ................................................................................. 258 3.1.3. Recommendations for the user .............................................................................. 258 3.2. Rights management ....................................................................................................... 258 3.2.1. User ................................................................................................................. 259 iii 3.2.2. Roles ............................................................................................................... 259 3.2.3. Privileges .......................................................................................................... 260 3.2.4. Access control with SQL statements ....................................................................... 260 3.2.5. Meta information on rights management ................................................................. 261 3.2.6. Rights management and transactions ...................................................................... 261 3.2.7. Example of rights management ............................................................................. 261 3.3. Priorities ..................................................................................................................... 262 3.3.1. Introduction ...................................................................................................... 263 3.3.2. Priorities in Exasol ............................................................................................. 263 3.3.3. Example ........................................................................................................... 264 3.4. ETL Processes .............................................................................................................. 264 3.4.1. Introduction ...................................................................................................... 265 3.4.2. SQL commands IMPORT and EXPORT ................................................................. 265 3.4.3. Scripting complex ETL jobs ................................................................................. 266 3.4.4. User-de®ned IMPORT using UDFs .......................................................................