By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 697 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

Mysql update stored procedure

P: 1
Hi , i need to write a script for upadate stored procedure in mysql, this is my code , but someting is not good , can anyone help me? Thanks!

Expand|Select|Wrap|Line Numbers
  1. CREATE DEFINER=`root`@`localhost` PROCEDURE `table_upd`
  2. (IN customer_id int, IN cname_param VARCHAR(45),IN lastname_param VARCHAR(45), IN date_of_birth_param DATE,
  3. IN country_param VARCHAR(45), IN email_param VARCHAR(100), IN username_param VARCHAR(45), IN short_biography_param TEXT
  4. )
  5. BEGIN
  6. UPDATE customer
  7. SET cname = cname_param,
  8. lastname = lastname_param,
  9. date_of_birth = date_of_birth_param,
  10. country = country_param,
  11. email = email_param,
  12. username = username_param,
  13. short_biography = short_biography_param
  14. WHERE customer_ID=customer_id;
  15. END 
Jun 29 '17 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.