Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Oracle only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Oracle
Truncate table inside trigger(Urgent help needed)
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
jith87
New Member
Join Date:
Jul 2007
Posts:
58
#1
Truncate table inside trigger(Urgent help needed)
Oct 4 '07, 05:06 AM
hi,
how do you truncate a table inside a trigger(plsql) if the table size is more than 1000 records???
regards,
jith
debasisdas
Recognized Expert
Expert
Join Date:
Dec 2006
Posts:
8119
#2
Oct 4 '07, 06:42 AM
Try to use native dynamic sql (EXECUTE IMMEDIATE)
also mark the trigger as
pragma autonomous_tran saction;
Comment
Post
Cancel
gintsp
New Member
Join Date:
Aug 2007
Posts:
36
#3
Oct 4 '07, 11:18 AM
Originally posted by
debasisdas
Try to use native dynamic sql (EXECUTE IMMEDIATE)
also mark the trigger as
pragma autonomous_tran saction;
Just remember that pragma autonomous_tran saction and truncate is very dangerous tool. In case your main transaction is rolled back, truncated table will remain truncated anyway.
Gints Plivna
Startseite - GPLivna
http://www.gplivna.eu
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment