SQL server 2012 how to apply a check constraint on multiple columns I would like to ask if it is possible to apply a check constraint on multiple columns using one statement. I mean instead of adding a constraint for each column.

Scenario:
I have a table named 'Buyer' and contains these colums: BuyerId, BuyerName, BuyerSurname, BuyerEmail &amp; BuyerAddress.

I need to apply a no empty string check constraints on BuyerName, BuyerSurname &amp; BuyerEmail columns only.

Can this be done at one go instead of one constraint for each column?

Thanks for your help in advance

Kevin
You can create a table-level check constraint with multiple columns specified in the expression in order to avoid separate check constraints. 

This example will not allow an empty string, all spaces, or NULL in these columns:

CREATE TABLE dbo.Buyer(
      BuyerId int NOT NULL
        CONSTRAINT PK_Buyer PRIMARY KEY
    , BuyerName varchar(50) NOT NULL
    , BuyerSurname varchar(50) NOT NULL
    , BuyerEmail varchar(50) NULL
    , BuyerAddress varchar(50) NOT NULL
    , CONSTRAINT CK_Buyer_BuyerName_BuyerSurname_BuyerEmail_NotEmpty CHECK
        ('' NOT IN (BuyerName,BuyerSurname,BuyerEmail) )
    );