EnginKARATAS / How-to-check-a-email-or-a-constraint-with-triggers-instead-of

With this code, check your mask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

--# How to check a email or a constraint with triggers-instead of --With this code, check your mask

--Check email with istead of trigger

create TRIGGER CheckEmail ON Activeusers INSTEAD OF INSERT

AS

BEGIN

declare @email varchar(40)

SELECT @email = email FROM INSERTED;

if(@email like '%_@%.%')

begin

print @email

end

else

begin

print 'this statement doesnt providing.(emails doesnt matching)'

end

END

insert into Activeusers values('enginkaratas99@gmail.com','xx','xx')

About

With this code, check your mask