question

OracleApprender avatar image
OracleApprender asked

What is the maximum no.of statements that can be specified in a trigger statement ?

How many number of statements we can specigy in a trigger statement. I mean is there any limit on this ? Thanks in advance.

databaseplsql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Palmer avatar image
Nick Palmer answered

The trigger should just have one anonymous block, if I remember rightly. And in that anonymous block you can have more anonymous blocks, function calls and procedure calls. As many as you like, effectively.

See: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm For more information

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KillerDBA avatar image KillerDBA commented ·
FYI - I've seen multiple references to a 32K limit on the size of the trigger code.
0 Likes 0 ·
OracleApprender avatar image
OracleApprender answered

We can specify only one statement in a trigger statement.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KillerDBA avatar image KillerDBA commented ·
As of the current release, I'm fairly certain that's not right. If you're referring to a limit in an older version of Oracle, like 9, you should say so. The current documentation allows a PL/SQL block, which can be any number of statements (although the 32K code limit applies).
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.