SQL statements

Following is a list of SQL enhancements introduced in SQL Anywhere version 11.0.1.

  • New DEFAULT VALUES clause, INSERT statement   The new DEFAULT VALUES clause of the INSERT statement allows you to insert the default values for all columns. See INSERT statement.

  • CREATE ENCRYPTED DATABASE statement   This statement creates an encrypted copy of an existing database, including all transaction logs, mirror logs, and dbspaces. You can also use this statement to create a copy of a database with table encryption enabled. See CREATE ENCRYPTED DATABASE statement.

    If you want to encrypt a database that requires recovery, for example to send to technical support, you must still use the CREATE ENCRYPTED FILE statement. See CREATE ENCRYPTED FILE statement.

  • CREATE DECRYPTED DATABASE statement   This statement creates a decrypted copy of an existing database, including all transaction logs, mirror logs, and dbspaces. See CREATE DECRYPTED DATABASE statement.

    If you want to decrypt a database that requires recovery, for example to send to technical support, you must still use the CREATE DECRYPTED FILE statement. See CREATE DECRYPTED FILE statement.

  • ALTER DATABASE statement enhancement   Attempting to execute an ALTER DATABASE UPGRADE statement on a database server that is currently being mirrored now results in an error. See ALTER DATABASE statement.

  • Create or replace a function, procedure, trigger, or view of the same name   The new OR REPLACE clause allows you to create or replace a function, procedure, trigger, or view of the same name. See:

  • Suppressing errors when a statement attempts to remove a database object that does not exist   The new IF EXISTS clause allows you to specify that you do not want an error returned when the DROP statement attempts to remove a database object that does not exist. See:

  • New INTO LOCAL TEMPORARY TABLE clause, SELECT statement   The new INTO LOCAL TEMPORARY TABLE clause of the SELECT statement allows you to create and populate a local temporary table with the result set of a SELECT statement. Previously, you could only do this by using an INTO clause if the temporary table name started with #. See SELECT statement.

  • New IF NOT EXISTS clause, CREATE TABLE statement   The new IF NOT EXISTS clause of the CREATE TABLE statement allows you to create permanent, global temporary, and local temporary tables if the table does not already exist. See CREATE TABLE statement.

  • Specify an owner when creating temporary procedures or functions   The CREATE FUNCTION and CREATE PROCEDURE statements now allow you to optionally specify the owner. See: