• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create Stored Procedure

 
ravindra patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my stored procedure but it is not working ...

CREATE PROCEDURE sp_select_custId (IN custId INTEGER)
BEGIN
select * from customer c,tapedelivery t where c.CustomerID=t.CustomerId And c.CustomerID = custId;
END;

But it is not running ..it is giving error ..please suggest me correct syntax/way to create this procedure.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error are you getting? can you please post the error as well?
 
ravindra patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Raghavahan
I am getting this error

"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 'select * from customer c,tapedelivery t where c.CustomerID = t.CustomerId And c.' at line 4"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic