473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to call the procedure inside the trigger

kaleeswaran
132 100+
Hi!
can i call the procedure inside the trigger?....
thank you,
kaleeswaran
Nov 14 '07 #1
5 7249
r035198x
13,262 8TB
Hi!
can i call the procedure inside the trigger?....
thank you,
kaleeswaran
The short anwer is "yes". Try it and see what happens.
Nov 14 '07 #2
amitpatel66
2,367 Expert 2GB
Hi!
can i call the procedure inside the trigger?....
thank you,
kaleeswaran
You can call a procedure from a trigger in a similar way you call them from any other block
Nov 14 '07 #3
kaleeswaran
132 100+
hi!
try to run the following trigger...but it shows error like this:

Access denied; you need the SUPER privilege for this operation
so what should i do?....

my code is:

Expand|Select|Wrap|Line Numbers
  1. CREATE TRIGGER `test`.`sample_tri` AFTER INSERT
  2.     ON test.test_one FOR EACH ROW
  3. BEGIN
  4.     insert into cust values(1,'sam');
  5. END;
Nov 14 '07 #4
amitpatel66
2,367 Expert 2GB
hi!
try to run the following trigger...but it shows error like this:

Access denied; you need the SUPER privilege for this operation
so what should i do?....

my code is:

CREATE TRIGGER `test`.`sample_tri` AFTER INSERT
ON test.test_one FOR EACH ROW
BEGIN
insert into cust values(1,'sam');
END;

I think you dont have CREATE TRIGGER Privilege to create a new trigger.
You need t oask your DBA To GRANT privileges to you for creating triggers!!
Nov 14 '07 #5
amitpatel66
2,367 Expert 2GB
Kaleeswaran,

As a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

MODERATOR.
Nov 14 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Gard T?nnesland | last post by:
Hi everyone, How can I retrieve the current identity used in a procedure from a trigger. What I am trying to do is: The procedure takes a @username (nvarchar) as a parameter, and the...
7
by: bajwa | last post by:
Hi Our SQL server has a lot of stored procedures and we want to get some cleaning up to be done. We want to delete the ones that have been not run for like 2-3 months. How exactly will i find out...
0
by: Dave Sisk | last post by:
I've created a system or external trigger on an AS/400 file a.k.a DB2 table. (Note this is an external trigger defined with the ADDPFTRG CL command, not a SQL trigger defined with the CREATE...
1
by: Serge Rielau | last post by:
Hi All, I'd like to get feedback (through email) from folks who use CALL in Trigger and do or do not get in trouble with the -746 SQLCODE: SQL0746N Routine "<routine-name>" (specific name...
3
by: Ricardo Corsi | last post by:
Hi, It is possible to call a trigger (inside a sql server..) with asp.net ? how can i do that ? thks!
2
by: Wei Wang | last post by:
Hi, Can I call multiple functions in one trigger? Something like this: CREATE TRIGGER match_cond_name_generate BEFORE INSERT OR UPDATE ON public.predicate_index FOR EACH ROW EXECUTE...
4
by: Pakna | last post by:
Hi, is there any way to call a JAVA stored procedure from a SQL Trigger? We are having difficulties with this and cannot verify whether DB2 even *has* this capability? Thank you very much....
3
by: mandible | last post by:
I'm trying to call one stored procedure inside another. I was wondering if this is possible Some ideas I was toying with is putting the first stored procedure inside of a temp table but haven't...
2
by: sscheral | last post by:
can we use stored procedure inside trigger? if yes how
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.