-->

Check if something exist in table sql oracle

I wanted to assign a condition which checks if something exist in (x,y,z..) in trigger but I could not check this because you cant use subqueries in trigger and can not store more than one values in a variable but you can achieve the purpose by using select count(xyz) into variable from ABC (table) where ________

For example
 
Imp(empno, ename, Job, salary)
Summary(Job,Num) {Num=total no of employees for each job in imp table}



Create or replace trigger updatesummary
before insert on imp
For each row
Declare no_of_emp Number ;
Begin
 
Select count(empno) into no_of_emp from imp where job=:new.job;
 
If no_of_emp=0 then
insert into summary values(:new.job,No_of_Emp+1);
else update summary set NUM=No_of_emp+1 where job=:new.job;
End if;
end;

All the IELTS Material on the internet

The folder below has all the material available on the internet relevant to IELTS, which include guides and several practice tests. (If there is something you find is not there please do let me know and I will add it).

If you are struggling with the IELTS test you can register to learn proven strategies for each module and question type from a professional and experienced IELTS Instructor who help students from around the world reach their desired band score for both Academic and General IELTS exam. The classes are conducted online so it does not matter where you may be from and the fee charged is the lowest compared to any other institute. For registration or queries contact using the details below:

Email: theieltsacademy2018@gmail.com
Follow us on Facebook 
www.Facebook.com/theieltsacademy2018

(Those who can not afford to pay the fee may be waived provided they are good enough with their grammar).

Aye rasool e amin lyrics junaid jamshed



Be Khabar Tu Jauhar-i Aa'inah Ayyaam Hai
Tu Zamaane Mai Khuda Ka Aakhri Paigham Hai. . . !!!


Ae Rasul-e-Amin, Khaatamal Mursaleen
Tujh Sa Ko'i Nahi, Tujh Sa Ko'i Nahi

Hai Aqeedah Yeh Apna Ba-Sidq Wa Yaqeen
Tujh Sa Ko'i Nahi, Tujh Sa Ko'i Nahi

Ae Rasul-e-Amin, Khaatamal Mursaleen


Bazm-e-Kaunain Pehle Sajaa'i Gayi
Phir Teri Zaat Manzar Pai Laayi Gayi

Sayyad al-Awwaleen, Sayyad al-Aakhireen
Tujh Sa Ko'i Nahi, Tujh Sa Ko'i Nahi
Sayyad al-Awwaleen, Sayyad al-Aakhireen

Mustafa, Mujtaba, Teri Madh O Sana
Mere Bas Mai Nahi, Dastaras Mai Nahi

Dil Ko Himmat Nahi, Lab Ko Yaara Nahi
Tujh Sa Ko'i Nahi, Tujh Sa Ko'i Nahi

Mustafa, Mujtaba, Teri Madh O Sana
Dil Ko Himmat Nahi, Lab Ko Yaara Nahi



Ae Rasul-e-Amin, Tujh Sa Ko'i Nahi

Dast-e-Qudrat Ne Aisa Banaaya Tujhe
Jumla Awsaaf Sai Khud Sajaaya Tujhe

Ae Azal Ke Haseen, Ae Abad Ke Haseen
Dhoondhti Hai Tujhe Meri Jaan-e-Hazeen

Tera Sikkah Rawa Kul Jahan Mai Huwa
Is Zameen Mai Huwa, Aasmaan Mai Huwa

Kya Arab Kya Ajam Sab Hai Zair-e-Nagin
Taubah Taubah Nahi, Ko'i Tujh Sa Nahi

Ae Rasul-e-Amin, Khaatamal Mursaleen
Tujh Sa Ko'i Nahi, Tujh Sa Ko'i Nahi

Hai Aqeedah Yeh Apna Ba-Sidq Wa Yaqeen
Tujh Sa Ko'i Nahi, Tujh Sa Ko'i Nahi


Ae Rasul-e-Amin, Khaatamal Mursaleen. . . !!!