Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Increments the counter associated with a semaphore.
NOTIFY SEMAPHORE [ owner.]semaphore-name [ INCREMENT BY number ]
The owner of the semaphore. owner can also be specified using an indirect identifier (for example, `[@variable-name]`).
The name of the semaphore. semaphore-name can also be specified using an indirect identifier (for example, `[@variable-name]`).
Specify a positive integer to indicate how much to increment the counter associated with the semaphore. If this clause is not specified, then the counter is incremented by 1.
number can be specified using a variable (for example, INCREMENT BY @inc-number).
If you set number to NULL, or if it is set to a variable and the variable value is NULL, the behavior is equivalent to not specifying the clause.
If the counter is 0, and a connection is blocked on a WAITFOR SEMAPHORE statement on this semaphore, the NOTIFY SEMAPHORE statement notifies the connection.
If a connection that notified a semaphore is dropped or canceled, the counter increment persists, so your application needs to be able to address this case.
You must have the UPDATE ANY MUTEX SEMAPHORE system privilege, or be the owner of the semaphore.
Not in the standard.
The following statement increments the counter for the license_counter semaphore by 1:
NOTIFY SEMAPHORE license_counter INCREMENT BY 1;