Column ordering in MySQL using ALTER TABLE – with examples.

MySQL allows table columns to be placed in a specific location among the other present columns. You likely don’t care one iota about column ordering. But, if you do – and your table is already established – you can still have your cake and eat it too by using simple ALTER TABLE commands in conjunction with certain keywords and place those columns in a position to your liking. Continue reading to see example queries…

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

CTE’s in MySQL – First steps…

Having recently upgraded my learning/development environment to MySQL 8 from version 5.7, I thought to start blogging on a couple of the (many) new fantastic features included in this latest version. With this blog post, I will begin what I plan to be a multi-part series on Common Table Expressions as I learn, explore, and use them…

[Head this way for more great MySQL blogging >>>]

Aggregate Functions part 2: SUM() and AVG() in MySQL with examples.

In Aggregate Functions Part 1: COUNT() – With examples in MySQL, we visited examples of the COUNT() aggregate function and explored different uses for its application.
As I continue this series on aggregate functions, this blog post will look at 2 more functions: SUM() and AVG(). Both which assist in calculating numeric values.
(more…)