New and changed Transact-SQL commands

This section describes the new and changed Transact-SQL commands in version 12.5.

Table 5-5 summarizes the new Transact-SQL commands.

Table 5-5: New commands

Command

Function

create function (SQLJ)

Creates a SQLJ function, which is a Java method with a SQL name.

drop function

Removes a SQLJ function from the database.

Table 5-6 summarizes the changes to existing Transact-SQL commands.

Table 5-6: Changed commands

Command

Change

disk init

Allows the following unit specifiers for the device size: ‘k’ or ‘K’ (kilobytes), ‘m’ or ‘M’ (megabytes), and ‘g’ or ‘G’ (gigabytes).

disk reinit

Allows the following unit specifiers for the device size: ‘k’ or ‘K’ (kilobytes), ‘m’ or ‘M’ (megabytes), and ‘g’ or ‘G’ (gigabytes).

create table

Supports the new size_in_bytes parameter, which allows you to specify the size of an in-row Java-SQL column.

alter table

Allows the following unit specifiers for the device size: ‘k’ or ‘K’ (kilobytes), ‘m’ or ‘M’ (megabytes), and ‘g’ or ‘G’ (gigabytes).

alter database

Allows the following unit specifiers for the device size: ‘k’ or ‘K’ (kilobytes), ‘m’ or ‘M’ (megabytes), and ‘g’ or ‘G’ (gigabytes).

set

You can update as many as 1024 columns in the set clause using literals, variables, or expressions returned from a subquery.

select...for browse

You cannot use the select...for browse option on tables containing more than 255 columns.

select select_list into...at pathname

Allows you to specify a proxy table as the target of a select into command. The at indicates that the new table is a proxy table.

compute

If a compute clause includes a group by clause:

  • The compute clause cannot contain more than 255 aggregates.

  • The group by clause cannot contain more than 255 columns.

Columns included in a compute clause cannot be longer than 255 bytes.

like

The character string indicated by the like keyword cannot be longer than 255 bytes.

declare cursor

You can include as many as 1024 columns in an update clause of a client’s declare cursor statement.

+ operator

Returns result strings up to a length of 16384 bytes.

dump database

Includes compression syntax for making a compressed dump.

load database

Includes compression syntax for loading a compressed dump.

dump transaction

Includes compression syntax for making a compressed dump.

load transaction

Includes compression syntax for loading a compressed dump.

print statement

The total length of the format string + the output cannot exceed 1K. However, Adaptive Server does not issue an error message if you exceed this length.

create procedure (SQLJ)

Creates a SQLJ stored procedure, which is a Java method with a SQL name. Adaptive Server executes a SQLJ stored procedure in the same way it executes a Transact-SQL stored procedure.

create access rule

Allows you to create a rule determining how a user connects to a server.

union in view

You are now allowed to use the union command in a view.

Table 5-7 summarizes the new and changed options for the set command.

Table 5-7: New and changed set command options

set option

Description

stringsize

Limits the number of bytes displayed when Adaptive Server returns a printable representation of a Java object. The default is 50 bytes.

Table 5-8 summarizes the new Transact-SQL functions.

Table 5-8: New Transact-SQL functions

Function

Description

lockscheme()

Returns the locking scheme of the specified object as a string.

pagesize()

Returns the page size, in bytes, for the specified object.