Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > TRUNCATE (IDS) > 4 4 4

The Table Specification

4

You must specify the name or synonym of a table in the local database to 4which you are currently connected. If the USETABLENAME environment 4variable is set, you must use the name of the table, rather than a synonym. 4The table can be of type STANDARD, RAW, or TEMP, but you cannot specify the 4name or synonym of a view. (Categories of tables that are not valid with TRUNCATE 4are listed in the section Restrictions.)

4

In a database that is ANSI-compliant, you must specify the owner qualifier if you are not the owner of the table or synonym.

4

After the TRUNCATE statement begins execution, Dynamic Server attempts 4to place an exclusive lock on the specified table, to prevent other sessions 4from locking the table until the TRUNCATE statement is committed or rolled 4back. Exclusive locks are also applied to any dependent tables of the truncated 4table within a table hierarchy.

4

While concurrent sessions that use the Dirty Read isolation level are reading 4the table, however, the TRUNCATE statement fails with an RSAM -106 4error. To reduce this risk, you can set the IFX_DIRTY_WAIT environment variable to specify that the TRUNCATE operation wait for 4a specified number of seconds for Dirty Read operations to commit or rollback.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]