This is veeranagu from banagalore.
its very good
I always appreciate you.please continue improving your service
to the World.......
I'm an IT student. I want to know more about database.
so, please help me.as beginning let me give you a question :
by using the following table structure shown like this:
Write a trigger to prevent insertion of record at a point where the total sum of credits taken by the student exceeds 144 credit hours.
why we are using triger and what is the usage?
Very Usefull information about Database Triggers.
Beofre Reading This ARTICLE I were did't have any Info about Database Trigger But Now I have Created many more and Complicated and Complex Triggers after reading this article.
Thanks to the Great Instructor.
please send me a trigger statement with best example and also a cursor and view concept.......................
DROP PROCEDURE IF EXISTS dcb_collect_interest$$
CREATE PROCEDURE dcb_collect_interest()
DECLARE done INT DEFAULT FALSE;
DECLARE interest1 DOUBLE;
DECLARE lref VARCHAR(30);
DECLARE cur1 CURSOR FOR
--- if i run this select stat i ll get output---
select iterestrate,loanref from loan where loanref in (select loanaccno from month_dcb where month1=2 and year1=2012);
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
FETCH cur1 INTO interest1, lref;
IF done THEN
-- here no updation ---0 rows affected
where loanaccno=lref and year1=2012 and month1=2;
u r examples are excelent
In this example
"mysql> CREATE TRIGGER ins_trig BEFORE INSERT ON Emp
-> FOR EACH ROW
-> UPDATE Employee SET Salary=Salary-300 WHERE Perks>500;
Query OK, 0 rows affected (0.01 sec)
mysql> delimiter ;
mysql> INSERT INTO Emp VALUES(9,'Rajesh','Delhi','Developer',15000,658);"
what happens to 9th row which is being inserted?
in the above material you are using emp as insert table and employee as the dispay table.
Please use only one name
it is very useful and easiest way to learn about trigger... really it is very useful to me.. thank you..
Well now we have a handy reference of SQL in android market named SQL guru for free .......go through tweaks in the tips and walkthroughs given.....its pretty cool.
I am trying this program of setting salary 10000 if salary<=500 and 15000 if salary>500. when i am fireing the trigger it get executed but after updating the salary SET to 500.all the salary is setting to 500.that means trigger is not workinng.why this happend..please reply...
Congratulates to giving the so simple example the clear description.
i currentlly working on a banking system based on sql
so plz recommend me triggers if any idea please...
oh really it is very nice and short note on trigger i like it.................
a lot of thanx.
VERY GOOD EXAMPLES CLEAR PRACTICAL EXPLANATION.
THANK YOU FOR THIS.PLEASE FORWARD THIS TYPE CLEAR EXPLANATION EXAMPLES TO MY EMAIL FROM BASIC ONWARDS.PLEASE FORWARD THANK YOU.
this is very useful tutorial,specially for new developer..
i glad to see these tutorial on MYSQL
thanks for that
how to find 2nd largest salary or element in oracle.
not up to the level
I need some information about Tirgger (SQL)
if it is possible send as information about that
If we want to allow trigger for update or store TimeIn an TimeOut in employees table to calculate total working hours of an employee.
very good service
siri want moreinformation on trigeer with some more example of trigger
Post your Comment