|
|
|
|
UPDATE dbo.table1
SET monAttribut = '0'
WHERE EXISTS (SELECT * FROM dbo.table2 t2 WHERE idTable1 = t2.id)
BEGIN TRANSACTION UpdateMonAttributTable1 ;
UPDATE dbo.table1
SET monAttribut = '0'
WHERE EXISTS (SELECT * FROM dbo.table2 t2 WHERE idTable1 = t2.id)
COMMIT TRANSACTION UpdateMonAttributTable1 ;
Essayons de savoir qu'est ce que se passe :
Begin Tran Update... if error <> 0 begin Rollback Tran select @error end else commit tran Cdt, Zorex |
Résultats pour [T SQL] Procédure stockée
Résultats pour [T SQL] Procédure stockée
Résultats pour [T SQL] Procédure stockée