T-SQL commands

Many of the commands use up to three-part table names. DB2 UDB supports these three-part naming convention:

NoteAll sybase mode commands are issued as language commands, unless otherwise noted.

Table B-1 lists each command and its description.

Table B-1: Transact-SQL commands

SQL command

Description

alter table

Adds new columns to an existing table.

begin transaction

Marks the starting point of a user-specified transaction.

commit transaction

Commits all work performed for this transaction.

create index

Creates a new index on a table.

create table

Creates new tables.

create view

Creates a new view.

delete (cursor command)

Removes rows from a table using a cursor command.

delete (dynamic command)

Removes rows from a table using a dynamic command.

delete (language command)

Removes rows from a table using a language command.

drop index

Removes an index from a table.

drop table

Removes a table.

drop view

Removes a view.

execute

Runs a system procedure or user-defined storage procedure.

grant

Assigns authorization to users.

insert (dynamic command)

Adds new rows to a table or view using a dynamic command.

insert (language command)

Adds new rows to a table or view using a language command.

prepare transaction

Checks to see if connections to databases are active.

revoke

Revokes authorization of users.

rollback transaction

Rolls back or aborts the current transaction.

select

Retrieves rows from the database objects.

truncate table

Truncates the table by removing all rows. This statement is not logged and is not part of any transaction.

update (cursor command)

Changes data in row made current by a read cursor (positional update).

update (dynamic command)

Changes data in existing rows using a dynamic command.

update (language command)

Changes data in existing rows using a language command.

use

Accesses an existing database.

For more information about Sybase SQL transformation mode commands, see the Sybase SQL Server Reference Manual.