Keywords: Hsqldb, HyperSQL, Database, JDBC, Java

| HyperSQL User Guide |
|  | Preface

# HyperSQL User Guide

## HyperSQL Database Engine (HSQLDB) 2.2

#### Edited by ### The HSQL Development Group #### Edited by ### Blaine Simpson The HSQL Development Group #### Edited by ### Fred Toussi The HSQL Development Group Copyright 2002-2011 The HSQL Development Group. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. You are not allowed to distribute or display this document on the web in an altered form. 2012-08-06 00:10:58+0100 |

List of Tables

1. Available formats of this document
10.1. TO_CHAR, TO_DATE and TO_TIMESTAMP format elements
12.1. Memory Database URL
12.2. File Database URL
12.3. Resource Database URL
12.4. Server Database URL
12.5. User and Password
12.6. Column Names in JDBC ResultSet
12.7. Creating New Database
12.8. Automatic Shutdown
12.9. Validity Check Property
12.10. SQL Keyword Use as Identifier
12.11. SQL Keyword Starting with the Underscore or Containing Dollar Characters
12.12. Reference to Columns Names
12.13. String Size Declaration
12.14. Type Enforcement in Comparison and Assignment
12.15. Foreign Key Triggered Data Change
12.16. Use of LOB for LONGVAR Types
12.17. Concatenation with NULL
12.18. NULL in Multi-Column UNIQUE Constraints
12.19. Truncation or Rounding in Type Conversion
12.20. Decimal Scale of Division and AVG Values
12.21. Support for NaN values
12.22. Sort order of NULL values
12.23. String comparison with padding
12.24. DB2 Style Syntax
12.25. MSSQL Style Syntax
12.26. MySQL Style Syntax
12.27. Oracle Style Syntax
12.28. PostgreSQL Style Syntax
12.29. Default Table Type
12.30. Transaction Control Mode
12.31. Default Isolation Level for Sessions
12.32. Transaction Rollback in Deadlock
12.33. Time Zone and Interval Types
12.34. Opening Database as Read Only
12.35. Opening Database Without Modifying the Files
12.36. Huge database files and tables
12.37. Temporary Result Rows in Memory
12.38. Event Logging
12.39. SQL Logging
12.40. Rows Cached In Memory
12.41. Rows Cached In Memory
12.42. Size of Rows Cached in Memory
12.43. Size Scale of Disk Table Storage
12.44. Size Scale of LOB Storage
12.45. Internal Backup of Database Files
12.46. Use of Lock File
12.47. Logging Data Change Statements
12.48. Automatic Checkpoint Frequency
12.49. Automatic Defrag at Checkpoint
12.50. Logging Data Change Statements Frequency
12.51. Logging Data Change Statements Frequency
12.52. Use of NIO for Disk Table Storage
12.53. Use of NIO for Disk Table Storage
12.54. Recovery Log Processing
12.55. Default Properties for TEXT Tables
12.56. Forcing Garbage Collection
12.57. Crypt Property For LOBs
12.58. Cipher Key for Encrypted Database
12.59. Crypt Provider Encrypted Database
12.60. Cipher Specification for Encrypted Database
12.61. Logging Framework
12.62. Text Tables
12.63. Java Functions
13.1. common server and webserver properties
13.2. server properties
13.3. webserver properties

List of Examples

1.1. Java code to connect to the local hsql Server
1.2. Java code to connect to the local http Server
1.3. Java code to connect to the local secure SSL hsql and http Servers
1.4. specifying a connection property to shutdown the database when the last connection is closed
1.5. specifying a connection property to disallow creating a new database
3.1. User-defined Session Variables
3.2. User-defined Temporary Session Tables
3.3. Setting Transaction Characteristics
3.4. Locking Tables
3.5. Rollback
3.6. Setting Session Characteristics
3.7. Setting Session Authorization
3.8. Setting Session Time Zone
4.1. inserting the next sequence value into a table row
4.2. numbering returned rows of a SELECT in sequential order
4.3. using the last value of a sequence
4.4. Column values which satisfy a 2-column UNIQUE constraint
11.1. Using CACHED tables for the LOB schema
11.2. Offline Backup Example
11.3. Listing a Backup with DbBackup
11.4. Restoring a Backup with DbBackup
11.5. Finding foreign key rows with no parents after a bulk import
13.1. Exporting certificate from the server's keystore
13.2. Adding a certificate to the client keystore
13.3. Specifying your own trust store to a JDBC client
13.4. Getting a pem-style private key into a JKS keystore
13.5. Validating and Testing an ACL file
14.1. example sqltool.rc stanza
15.1. Using CACHED tables for the LOB schema
15.2. MainInvoker Example
15.3. HyperSQL Snapshot Repository Definition
15.4. Sample Snapshot Ivy Dependency
15.5. Sample Snapshot Maven Dependency
15.6. Sample Snapshot Gradle Dependency
15.7. Sample Snapshot ivy.xml loaded by Ivyxml plugin
15.8. Sample Snapshot Groovy Dependency, using Grape
15.9. Sample Range Ivy Dependency
15.10. Sample Range Maven Dependency
15.11. Sample Range Gradle Dependency
15.12. Sample Range ivy.xml loaded by Ivyxml plugin
15.13. Sample Range Groovy Dependency, using Grape
B.1. Buiding the standard Hsqldb jar file with Ant
B.2. Example source code before CodeSwitcher is run
B.3. CodeSwitcher command line invocation
B.4. Source code after CodeSwitcher processing

$Revision: 4864 $

|  | Preface