SQL$HELP_OLD72.HLB  —  LOCK_TABLE, Arguments

1  –  DATA_DEFINITION

    Syntax options:

    DATA DEFINITION | READ | WRITE

    See the SET TRANSACTION statement for a description of the
    arguments.

2  –  lock_mode

    Syntax options:

    IN lock-mode MODE | FOR lock-mode MODE

    Specifies the lock mode to be used for the specified tables and
    views. The IN and FOR keywords are synonymous. A table lock mode
    can be promoted, but cannot be demoted. For example, you can
    promote a SHARED READ lock to SHARED WRITE, but you cannot demote
    a SHARED WRITE mode to a SHARED READ mode.

    See the SET TRANSACTION statement for a description of these
    arguments.

3  –  table-name

    The names of one or more tables or views currently existing in
    the database that you want to lock and reserve. You can specify
    tables created as GLOBAL or LOCAL TEMPORARY TABLES, but they
    will be ignored because these types of tables do not contain
    shared data and so are never locked. You can specify tables from
    multiple databases by using the alias name as a prefix to the
    table name. If you do not specify an alias, then the default
    alias is used.

4  –  wait-mode

    Syntax options:

    WAIT | NOWAIT | DEFAULT WAIT

    Specifies what the LOCK TABLE statement does when it encounters
    a locked table. If you specify WAIT, the statement waits for
    other transactions to complete and then proceeds. If you specify
    NOWAIT, your transaction returns an error message when it
    encounters a locked table. If you specify DEFAULT WAIT, then
    the lock mode specified for the current transaction is used.
    If you specify a different lock mode than was specified for the
    transaction, the mode you specify with the LOCK TABLE statement
    takes precedence, unless the table is already reserved.

    The WAIT clause is the default.
Close Help