MySQL CREATE TABLE SELECT

In this blog post, we will build on a previous post, where we cloned a new table with identical structure from an existing one, yet with no data. Leveraging CREATE TABLE SELECT syntax, we can take this a step further by populating the new table with data from the source table.


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…)

Filtering SELECT queries with the WHERE clause in MySQL.

Filtering SELECT query result sets is a common MySQL operation. This blog post will visit basic usage of the WHERE clause for just such a purpose.

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.

I will be using Xubuntu Linux 16.04.2 LTS (Xenial Xerus) and MySQL 5.7.20 for these exercises.

(more…)

Populating a MySQL table with the INSERT statement – Beginner Series.

This third installment of the MySQL Beginner Series Basics will highlight INSERT syntax for populating tables with data. Be sure and visit both blog posts: CREATE Database, User, and Table – Easy examples with MySQL along with, ALTER TABLE: Examples with MySQL – Beginner Series, for an overview of the material covered so far in the series.
(more…)

ALTER TABLE: Examples with MySQL – Beginner Series.

In this second part of the MySQL Beginner Series Basics, I will explore various uses of the ALTER TABLE syntax.  Part 1 covered the CREATE command, establishing a database, table, and user. This blog post will build from there, so be sure to visit that post to get up to speed.
(more…)

Storing consistent and sound data with PostgreSQL CHECK CONSTRAINTS.

Data integrity and consistency should be top priorities for anyone who works with data. Wondering how can you enforce these practices in PostgreSQL? The CHECK CONSTRAINT is ready to do work!
(more…)