When a user encounters a lock, the default behavior of a database server is to return an error to the application. You can execute the following SQL statement to wait indefinitely for a lock:
SET LOCK MODE TO WAIT;
You can also wait for a specific number of seconds, as in the following example:
SET LOCK MODE TO WAIT 20;
To return to the default behavior (no waiting for locks), execute the following statement:
SET LOCK MODE TO NOT WAIT;Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]