MySQL Forums
Forum List  »  Stored Procedures

Re: checking datatype of parameters
Posted by: Peter Brawley
Date: April 15, 2014 11:31AM

This ...

drop procedure if exists p;
create procedure p(d date)
select date(d);
call p('humbug');

raises the error message ...

Incorrect date value: 'humbug' for column 'd' at row 1

For how to handle such errors see http://dev.mysql.com/doc/refman/5.7/en/condition-handling.html

Options: ReplyQuote


Subject
Views
Written By
Posted
1862
April 15, 2014 06:12AM
Re: checking datatype of parameters
932
April 15, 2014 11:31AM


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.