MySQL Forums
Forum List  »  Stored Procedures

Re: Why doesn't thisw work - syntax error
Posted by: Per-Erik Martin
Date: October 20, 2005 03:23AM

In the SQL-99/2003 standard (and mysql) syntax this would be:

CREATE PROCEDURE `leswana`.`accounts` (IN clientnumber INT)
BEGIN

select * from clientdetails cd where cd.clientnumber=clientnumber;

END

Note that @ is not used for parameters and variables (@ denotes a 'global' user variable in mysql), and the semicolon at the end of the statement.
(In this case 'cd.clientnumber' is used to tell it apart from the variable - an alternative is to use a different variable name to avoid confusion.)

pem, Senior Software Dev., MySQL AB

Options: ReplyQuote


Subject
Views
Written By
Posted
2462
October 19, 2005 08:12PM
Re: Why doesn't thisw work - syntax error
1721
October 20, 2005 03:23AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.