MySQL Forums
Forum List  »  Stored Procedures

Store proc returning null instead of 0
Posted by: John Noble
Date: September 01, 2017 07:29PM

Hi folks,

My sproc is returning null (instead of 0) using the following query:



SELECT s36 FROM vessels WHERE vesselID = p_vesselID;



It only returns null when p_vesselID cannot be found in the table. When this happens I just want to return 0.

Any ideas ??
J

Options: ReplyQuote


Subject
Views
Written By
Posted
Store proc returning null instead of 0
3130
September 01, 2017 07:29PM


Sorry, you can't reply to this topic. It has been closed.

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.