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.

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!


Two handy examples of the psql \copy meta-command.

In this blog post, I will cover example uses of the psql \copy meta-command, for client-side work with the PostgreSQL database server. This command allows users who do not have Superuser privileges, to perform COPY type SQL commands.


Utility psql command for saving query output to a file.


Photo by Tom Pumford on Unsplash

Ever needed or wanted to save particular query results for later? Perhaps you need to really study something for better understanding. Scrutinize a dataset with a hawk’s eye while having a coffee? Or just list out all of the tables in the database you are working in? The psql \o meta-command is your new best friend.


TRUNCATE table example in PostgreSQL.

In a previous blog post, I selected records from the staging_assets table to insert into their respective table, depending on the type of asset. Let’s empty out this table, yet keep the structure in place for future uploads, using the TRUNCATE command.