I need to implement something similar to what SQLServer does but in Oracle:
CODE: SQLSERVER
CREATE TRIGGER TR_ImpideBorradoMultiple
ON MiTabla AFTER DELETE
AS
BEGIN
IF(SELECT COUNT(*) FROM Deleted) > 1
Begin
raiserror('Prohibido eliminar mas de un registro a la vez', 16, 1)
rollback transaction
End
END
From what I have seen, in Oracle there are the variables: Old and: New, which are of type% rowtype so they only refer to the affected row, instead in SQLServer, Deleted refers to the set of affected rows .. I must conclude then that you can not do this in Oracle ???