Nothing beats real-world experience in programming. Actually, pretty much everything in life is learned through experience.

I was recently implementing a feature in a LAMP stack web application and ran into a sharp edge when filtering a MySQL query by DATETIME column values using the BETWEEN operator.

Image by OpenClipart-Vectors from Pixabay

I was under the impression that BETWEEN is inclusive, meaning that any values within the specified ranges, along with those matching both the high and low-end ranges themselves, would also be included in the returned result set.

BETWEEN is inclusive. However, as I discovered, a DATETIME column data type acts somewhat unexpectedly, when…


I recently wrote a couple of blog posts on the SQL CASE expression with examples in MySQL. As I study and learn more about Oracle SQL, I wanted to apply a CASE expression to the RPAD() character function for dynamic string padding. Continue reading to see an example query…

Image by Gerd Altmann from Pixabay

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

The SQL CASE expression is so…


The INSERT DML command introduces new rows of data into an SQL table. INSERT is under the Create domain of the CRUD acronym. When using the Oracle SQL Developer IDE, instead of writing a INSERT INTO command, there are visual elements within the IDE interface that help facilitate an INSERT operation. Continue reading to learn how with a simple example…

Choose Table To Insert Data Into

In the left-hand pane of SQL Developer (not shown) double-click on the table, you want to INSERT data into. A new dashboard will appear containing several different tabs.

Shown below are the dashboard view and table description for table STAGE_WALKING_STATS::


If you’re working with Oracle SQL and need to load CSV data into one of your tables, using Oracle SQL Developer makes this process a breeze. Continue reading to see a simple example and learn how…

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

I have written quite a few blog posts about CSV’s in an SQL context (some in a Python environment…


Manipulating string or character data is a bread-and-butter practice in programming. There are a plethora of requirements, reasons, and use cases in which you might need to slice and dice a string character value. The Oracle SQL SUBSTR() function can be used to extract specific portions of a string. If you are unfamiliar with SUBSTR(), continue reading further to learn more about it, and add this handy function to your SQL toolbelt.

Image by Gerd Altmann from Pixabay

Why am I writing about the SUBSTR() function?

I have been studying Oracle SQL and recently used the SUBSTR() character function in an attempt to store duration-type data values (E.g., …


During many decision-making phases in programming code (conditional logic), there are times execution depends on several different factors. Multiple conditional tests are powerful and constraining, oftentimes requiring more than one test to be passed in order for program flow to proceed. For MySQL (and standard SQL in general) the CASE expression is used for IF/THEN/ELSE conditional logic.

The post, MySQL Simple CASE Expression – with examples, covered Simple CASE queries which are essentially equality tests. MySQL Simple CASE is but one variant of 2, with the other being a MySQL Searched CASE Expression. A MySQL Searched CASE Expression can have…


I constantly look to improve SQL-related skills and knowledge. Having a foundational understanding of MySQL, with moderate to heavy use (and some with PostgreSQL), I have had the Oracle Database in my eye for some time.

Oracle SQL used to feel less approachable to me. I am a Linux user and have found that depending on what Distro you are running, installing Oracle SQL — the XE Edition — can be easy-peasy or it can be, meh... (At least that was my experience.)

However, these days there is the Always Free Oracle Autonomous Database hosted on OCI which I recently…


Programming logic is foundational in any application or piece of software. Without it, software wouldn’t really do much of anything. Everything happens off of choice. In the end, some truthy or falsy value is what makes stuff work. For IF/THEN/ELSE logic in standard SQL, there is the CASE expression. There are 2 variations of the CASE Expression: Simple and Searched. In this post, I cover the Simple MySQL CASE expression with example queries.

Image by Nika Akin from Pixabay

OS and DB used:

  • Linux Mint 20 “Ulyana”
  • MySQL 8.0.23

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite…


Be it running reports or displaying data in some other visualization, SQL SELECT column expressions should be meaningful and understandable. To provide those valuable query results, SQL Developers use a multitude of available functions, adjacent columns, or other means not readily apparent to end-users. All that being said, the column names often suffer the most as far as readability is concerned, taking on long function call names or other combined expressions. But, as luck would be on our side, there is an easy fix and that is aliasing columns using the AS keyword. …


Digital Owl’s Prose

Each SQL dialect is different in some way, shape, form, or fashion from the next flavor. Some dialects have this function, while others have that function. In this post, I cover porting over Oracle SQL to MySQL in order to count the number of occurrences of a specific weekday found in the current given month (at the time of writing) purely as a learning exercise focused on MySQL DATE functions and the WITH clause…

Image by tigerlily713 from Pixabay

OS and DB used:

  • Linux Mint 20 “Ulyana”
  • MySQL 8.0.23

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your…

Joshua Otwell

SQL and PHP/CodeIgniter Developer. Growing through Technical Writing and Blogging my journey and passion at https://joshuaotwell.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store