开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜