Allow Only Alphabets in Column – Sql sever

User can create a check constraint over column to allow insertion of alphabets in the column.

CREATE TABLE TestTable
(ID INT, FirstCol VARCHAR(100),
CONSTRAINT FirstCol CHECK (FirstCol NOT LIKE  ‘%[^A-Z]%’))

Leave a comment