MySql Stored Procedure Help
I'm writing some procedures in MySql rather than MS SQL, and I'm having a bit of a problem with syntax.
CREATE PROCEDURE spAddUser
(
IN pUsername Varchar(20),
IN pPassword Varchar(16),
IN pFirstname Varchar(20),
IN pSurname Varchar(20),
IN pEmail Varchar(50),
IN pWebsite Varchar(50)
)
BEGIN
INSERT INTO
users
(Username, Password, Firstname, Surname, Email, Website)
VALUES
(pUsername, pPassword pFirstname, pSurname, pEmail, pWebsite);
END;
This is the code I have come up with so far, just a basic add user proc, but I keep getting this error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'pFirstname, pSurname, pEmail, pWebsite)' at line开发者_如何学运维 15
Any ideas what I'm doing wrong?
You're missing a comma between pPassword
and pFirstname
in the line after VALUES
.
精彩评论