What I am wanting to do is insert a new record if the record doesn't already exist. I have the following stored procedure and my question is very minor but will niggle me if I don't ask...
Though I am not actually wanting the data from my SELECT statement to be returned to my application does it anyway?... you will see that I am just wanting to use the SELECT statement to find out whether to run the INSERT statement.
CREATE PROCEDURE [dbo].[INSERTUser]
SELECT uname FROM tbluser
uname = @uname AND
pword = @pword
IF @@ROWCOUNT = 0
INSERT INTO tbluser