MySQL 5.5 introduces signals, which are similar to exceptions in other languages:
http://dev.mysql.com/doc/refman/5.5/en/signal.html
For example, in the mysql
command line client:
mysql> SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Custom error';
ERROR 1644 (45000): Custom error
More Related Contents:
- Stored procedure that Automatically delete rows older than 7 days in MYSQL
- Can I create view with parameter in MySQL?
- Pass array to MySQL stored routine
- Connect By Prior Equivalent for MySQL
- MySQL stored procedure vs function, which would I use when?
- MySQL stored procedures use them or not to use them
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation ‘=’
- MySQL create stored procedure syntax with delimiter
- mysql dynamic query in stored procedure
- Writing optional parameters within stored procedures in MySQL? [duplicate]
- Dynamic table names in stored procedure function
- List of Stored Procedures/Functions Mysql Command Line
- passing LIMIT as parameters to MySQL sproc
- mysql stored procedure that calls itself recursively
- MySQL triggers cannot update rows in same table the trigger is assigned to. Suggested workaround?
- How do you debug MySQL stored procedures?
- How do I get SUM function in MySQL to return ‘0’ if no values are found?
- How can I use transactions in my MySQL stored procedure?
- MySQL Stored Procedure Error Handling
- MySQL Stored Procedures not working with SELECT (basic question)
- use a variable for table name in mysql sproc
- Split a string and loop through values in MySQL stored procedure
- How to schedule a stored procedure in MySQL
- My SQL Dynamic query execute and get ouput into a variable in stored procedure
- MySQL : When stored procedure parameter name is the same as table column name
- What is dynamic SQL?
- How to use Table output from stored MYSQL Procedure
- Call a stored procedure for each row returned by a query in MySQL
- Mysql stored procedure don’t take table name as parameter
- How to pass a variable to a IN clause?