SQL CRUD Compilation

SQL CRUD is everywhere in the database world. Be it application development or ad-hoc queries in analysis, there is a strong chance you are executing one of the CRUD commands: Create, Read, Update, or Delete. Having written several blog posts in the past on MySQL CRUD, I feel you the readers deserve an easy means to access them all. Therefore, consider this post the MySQL CRUD Compilation post. Enjoy!

[Keep reading for more SQL database and Python-centric content >>>]
Advertisements

SUBSTRING_INDEX() function in MySQL – with examples.

I recently used the MySQL SUBSTRING_INDEX(), function for a requirement in a PHP/MySQL reporting dashboard I am developing, and thought to write about SUBSTRING_INDEX() general usage. Although this post has arbitrary examples, I’m sure you can find a use for this function in specific cases. Continue reading and see basic queries including SUBSTRING_INDEX in the SELECT clause…

[Keep reading for more SQL database and Python-centric content >>>]

MySQL DATE Calculations using INTERVAL – with examples

Recently in my day job, while developing the back-end of a reporting dashboard with PHP and MySQL, I noticed some interesting differences in DATE math calculations. The examples used in this post are purely arbitrary but stem from lessons learned, therefore, I feel they are definitely worth sharing…

[Keep reading for more SQL database and Python-centric content >>>]

CREATE TABLE using Python in the MySQL Shell – with examples.

Not only are basic SQL CRUD operations supported in MySQL Shell Python mode, but you can also execute DDL commands such as CREATE TABLE. While there is not a specific create_table() method per se, there is a sql() method for this – and other – types of commands that don’t have an individual method such as those for each of the individual CRUD operations. Keep reading to see a simple example use of the sql() method…

[Keep reading for more SQL database and Python-centric content >>>]

MySQL Shell CRUD With Python: Delete – with examples

Throughout the MySQL Shell CRUD with Python series, we’ve visited specific methods to 1) Populate tables with new data through the use of insert(). 2) Read and see the existing data with select(). 3) Modify the present data using update(). In this post, I’ll cover examples of removing rows of data in MySQL with the Python Shell delete() method. As with other DML commands, the affected rows are dependent upon using the where() method. Keep reading to learn how…

[Keep reading for more SQL database and Python-centric content >>>]