I have a sql table for storing unique e-mails.I need a stored procedure that could let a user that uses aspnet page to insert data know that the e-mail address already exists on a table and specify a new one.
The table looks like this:
EMailID int NOT NUL (1,1),
UserID int NOT NULL FK,
EMailAdress varchar(128) NOT NULL,
Description varchar(100)
My actual stored procedure looks like this
CREATE PROCEDURE dbo.InsertE-Mail
@UserID int,
@EMailAdress varchar(128),
@Description varchar(100)
AS
BEGIN
INSERT E-MAIL
(
UserID,
EMailAdress,
Description
)
VALUES
(
@UserID,
@EMailAdress,
@Description
)
END
GO
Any one can help?