SQL - Trigger to update a column as NULL when another column has a fixed value I have a table for Seller. If seller type is 'organization', I want the MidName of Seller to be blank (NULL).
Is it possible to create a trigger that does so after insert?

Column names in table: 


SellerID
Type(fixed value - either Org or Ind)
FirstName
MidName
LastName
Address
PhoneNo


If Type is "Org" then MidName must be updated to blank (even if some value is entered during Insert)
I agree with Andriy that a constraint should be used, but to answer your question if this is possible with a trigger, the answer is yes.

Here is the trigger:

CREATE TRIGGER i_Seller
ON Seller
AFTER INSERT
AS
IF EXISTS (SELECT NULL FROM inserted i WHERE Type = 'Org')
BEGIN;
    UPDATE s
    SET MidName = NULL
    FROM Seller s
    JOIN inserted i ON s.SellerID = i.SellerID
    WHERE s.Type = 'Org';
END;