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
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
No comments:
Post a Comment