Q:

SQL Server Trigger after insert update and delete

Want to create a trigger where I have two table "A" and "B" and table "A" has already some records in it so i want to write a trigger in table "B" where i want to check condition if table "A" has already the record exist which is inserting then do not insert or fire a trigger of table "B" if record is not exist in table "A" then fire a trigger and insert a record into the table.

A:

As SQL Server doesn't have BEFORE INSERT triggers to alter that insertion before its done, I would use an INSTEAD OF INSERT trigger (your trigger code is executed instead of the usual insertion, so you can add your checks and/or additional actions).
This trigger sample will only insert rows in A when they don't exist in B:
CREATE TRIGGER tr_a_ioi ON A
INSTEAD OF INSERT 
AS BEGIN 
  insert into A 
         select I.* 
         from inserted I
              left join B on B.PK_Field = I.PK_Field
         where B.PK_Field is null -- no corresponding row is found in B   
END

You can write similar INSTEAD OF UPDATE and INSTEAD OF DELETE triggers to do additional checks or actions when trying to update or delete rows in A.

