Triggers
Create Trigger Name on Table for insert as instead of insert Begin End View: It is a virtual table How many triggers are possible per table? One Instead Of Trigger and any After Triggers. 1. How many a's in a given string select LEN('vinoth')-Len(REPLACE('Vinoth','a','')) 2. Count of mails in a table: select Mail,Count (Mail ) Count from (select right(EmailId,Len(EmailId)- charindex('@',EmailId)) Mail from UserPersonalDetails) a group by Mail; 3. Update M to F & F to M in single statement update Emp set Gender= case when gender='M' then gender='F' when gender='F' then gender='M' else gender end 4. Print 1 to 100 with out loop with a as (select count=1 union all select COUNT=Count+1 from a where COUNT<100) select * from a 5. Delete Duplicate records a. Table have identity column: delete from Emp where ID in (Select Max(ID) from Emp group by Name, Gender having Count...