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.



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.


INSERT with SELECT statement for columns with FOREIGN KEY constraint in MySQL with examples.

In this blog post, we’ll look at an example of INSERT with SELECT syntax to honor those FOREIGN KEY constraints we have in place that ensure referential integrity between rows in separate tables.

Database command categories: A high level overview – DDL.

This blog post is part 1 in a ‘mini-series’ of posts providing a high-level overview of SQL database commands. Coverage here is not exhaustive, only a brief visit of the command category. I’ve also included informative resources in addition to specific sections from the official documentation (see the closing section for the link to the main PostgreSQL documentation page). Search engines are your friend for a deeper exploration.