Subject Atomic Execution
Author Juan Pedro López Sáez
Hello all,

Is this SQL statement atomically executed?

IF (EXISTS (SELECT C_STATE
FROM SETUP_PUSH_PROMOTION
WHERE ((K_PROMOTION =:PROMOTION)
AND (C_STATE = 'PENDIENTE'))
)
)
THEN UPDATE PROMOTIONS SET C_STATE = 'ACTIVO'
WHERE K_PROMOTION = :PROMOTION;
ELSE UPDATE PROMOTIONS SET C_STATE = 'INACTIVO'
WHERE K_PROMOTION = :PROMOTION;

It will be part of a Stored Procedure, but I suppose this has nothing to
do with atomic execution.

Is there any rule to know whether a SQL statement is atomic or not?

Thank you in advance.

Juan Pedro Lopez
--
Juan Pedro López Sáez
ALTIRIA TIC, S.L.L.
www.altiria.com