Hey everyone hope Friday is going well!
I have to declare that I am a DBA returning to the field after an 8 year break, and this time I'm trying to learn SQL. I have a problem with this query that we are going to exec from a Web front end to update a site User login/validation table where the username and password are sent after their login information is verified . The basic Insert works to , but when I try to create the stored proc, then it won't create and has a problem with the WHERE clause. What am I doing wrong?
--------------------------------------------------------
CREATE PROCEDURE sp_Insert_Register_Table_UserandPassword
@ID int,
@username char(30),
@password char(30)
AS
UPDATE Register (username, password)
VALUES (@username,@password)
WHERE ID = @ID
I have to declare that I am a DBA returning to the field after an 8 year break, and this time I'm trying to learn SQL. I have a problem with this query that we are going to exec from a Web front end to update a site User login/validation table where the username and password are sent after their login information is verified . The basic Insert works to , but when I try to create the stored proc, then it won't create and has a problem with the WHERE clause. What am I doing wrong?
--------------------------------------------------------
CREATE PROCEDURE sp_Insert_Register_Table_UserandPassword
@ID int,
@username char(30),
@password char(30)
AS
UPDATE Register (username, password)
VALUES (@username,@password)
WHERE ID = @ID