Check Username if it exist in Database then- Message already Exist


THIS IS DONE THROUGH STORED PROCEDURE

CREATE PROCEDURE [dbo].[checkusername]
(
@name varchar (50),
@gender char ,
@dob nvarchar,
@deslogin nvarchar

)
AS
BEGIN

IF EXISTS(SELECT * FROM REGISTRATION WHERE [name] = @name)
BEGIN
print 10
END
ELSE
BEGIN
INSERT into REGISTRATION([name], gender,dob,deslogin) VALUES(@name,@gender,@dob,@deslogin )
END
END

 
Ebook Download
View all
Learn
View all