Transbase SQL Guide

Transbase SQL Guide

Transbase® SQL Reference Manual Transbase SQL Reference Manual Version V8.1 Publication date 2019-08-08 Copyright © 2018 Transaction Software GmbH ALL RIGHTS RESERVED. While every precaution has been taken in the preparation of this document, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. Table of Contents Introduction ................................................................................................................. xi 1. General Concepts ...................................................................................................... 1 1.1. Syntax Notation .............................................................................................. 1 1.2. Separators ...................................................................................................... 1 1.3. Keywords ...................................................................................................... 1 1.4. Identifiers ...................................................................................................... 1 1.4.1. User Schemas ...................................................................................... 2 1.4.2. Names and Identifiers ............................................................................ 3 1.5. Data Types .................................................................................................... 4 1.5.1. Type Compatibility ............................................................................... 7 1.5.2. Type Exceptions and Overflow ............................................................... 7 1.5.3. CASTing Types from and to CHAR ........................................................ 8 1.6. Literals ........................................................................................................ 10 1.6.1. Directory/File Literal ........................................................................... 10 1.6.2. IntegerLiteral ...................................................................................... 11 1.6.3. NumericLiteral ................................................................................... 11 1.6.4. RealLiteral ......................................................................................... 12 1.6.5. StringLiteral ....................................................................................... 12 1.6.6. BinaryLiteral ...................................................................................... 13 1.6.7. BitsLiteral .......................................................................................... 13 1.6.8. BoolLiteral ......................................................................................... 13 1.6.9. DATETIME Literal ............................................................................. 14 1.6.10. TIMESPAN Literal ............................................................................ 14 2. Data Definition Language .......................................................................................... 15 2.1. Dataspaces ................................................................................................... 15 2.1.1. CreateDataspaceStatement .................................................................... 15 2.1.2. AlterDataspaceStatement ...................................................................... 16 2.2. Users ........................................................................................................... 16 2.2.1. GrantUserclassStatement ...................................................................... 16 2.2.2. RevokeUserclassStatement .................................................................... 17 2.2.3. AlterPasswordStatement ....................................................................... 18 2.2.4. GrantPrivilegeStatement ....................................................................... 18 2.2.5. RevokePrivilegeStatement .................................................................... 19 2.3. Domains ...................................................................................................... 20 2.3.1. CreateDomainStatement ....................................................................... 20 2.3.2. AlterDomainStatement ......................................................................... 21 2.3.3. DropDomainStatement ......................................................................... 22 2.4. Sequences .................................................................................................... 22 2.4.1. CreateSequenceStatement ..................................................................... 22 2.4.2. DropSequenceStatement ....................................................................... 23 2.5. CreateTableStatement ..................................................................................... 23 2.5.1. Defaults ............................................................................................. 26 2.5.2. AUTO_INCREMENT Fields ................................................................ 26 2.5.3. TableConstraintDefinition FieldConstraintDefinition .................................. 27 2.5.4. PrimaryKey ........................................................................................ 28 2.5.5. CheckConstraint .................................................................................. 29 2.5.6. ForeignKey ........................................................................................ 30 2.6. AlterTableStatement ....................................................................................... 32 2.6.1. AlterTableConstraint ............................................................................ 32 2.6.2. AlterTableChangeField ......................................................................... 33 2.6.3. AlterTableRenameField ........................................................................ 33 2.6.4. AlterTableFields ................................................................................. 34 2.6.5. AlterTableRename ............................................................................... 34 2.6.6. AlterTableMove .................................................................................. 35 2.7. DropTableStatement ....................................................................................... 35 iii Transbase® SQL Reference Manual 2.8. CreateIndexStatement ..................................................................................... 35 2.8.1. StandardIndexStatement ....................................................................... 36 2.8.2. HyperCubeIndexStatement .................................................................... 37 2.8.3. FulltextIndexStatement ......................................................................... 38 2.8.4. BitmapIndexStatement ......................................................................... 39 2.9. DropIndexStatement ....................................................................................... 39 2.10. Triggers ..................................................................................................... 39 2.10.1. CreateTriggerStatement ...................................................................... 39 2.10.2. DropTriggerStatement ........................................................................ 41 2.11. Views ........................................................................................................ 41 2.11.1. CreateViewStatement ......................................................................... 41 2.11.2. DropViewStatement ........................................................................... 42 3. Data Manipulation Language ..................................................................................... 44 3.1. FieldReference .............................................................................................. 44 3.2. User ............................................................................................................ 44 3.3. Expression .................................................................................................... 45 3.4. Primary, CAST Operator ................................................................................ 45 3.5. SimplePrimary .............................................................................................. 46 3.5.1. SetFunction ........................................................................................ 47 3.5.2. WindowFunction ................................................................................. 48 3.5.3. StringFunction .................................................................................... 49 3.5.4. TocharFunction ................................................................................... 55 3.5.5. SignFunction ...................................................................................... 55 3.5.6. ResultcountExpression ......................................................................... 55 3.5.7. SequenceExpression ............................................................................ 56 3.5.8. ConditionalExpression ......................................................................... 56 3.5.9. TimeExpression .................................................................................. 59 3.5.10. SizeExpression .................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    211 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us