MySQL Stored Procedures: Create functions with error handling for repetitive tasks.

A previous blog post I wrote, INSERT with SELECT statement for columns with FOREIGN KEY constraint in MySQL with examples, we visited using INSERT with SELECT syntax adding records to one table, honoring FOREIGN KEY constraints in another. Constantly retyping that SELECT for each INSERT can be automated by ‘wrapping’ it up a function and that will be the focus for this blog post.

(more…)

Advertisements

Utilize parameters with MySQL Stored Procedure by examples.

MySQL Stored Procedures and Functions enable database devs the ability to wrap useful bits of code in a nice little ‘package’ for reuse. In this blog post, I will provide a simple example to get you started on incorporating stored procedures into your own daily work flow.
Note: All data, names or naming found within the database presented in this post, are strictly used for practice, learning, instruction, and testing purposes. It by no means depicts actual data belonging to or being used by any party or organization.

(more…)

Hacking SQL – Tools, Utilities, and Work flow.

I recently got a great suggestion from a reader over on Medium about sharing my workflow tools when hacking on SQL (mainly PostgreSQL, but sometimes MySQL also), hence here we are in this blog post.

(more…)