
The ALTER TABLE command enables you to change the galaxy_coins column’s data type from INTEGER to a decimal value type. Suppose the galaxy_coins column now needs to represent a sort of ‘game currency’ and must support decimal values instead of whole numbers. The galaxy_user table created in the previous post of the series. In the previous post of the series, I demonstrated creating a table named galaxy_user shown below: To edit or change an existing table, you use the ALTER TABLE command. I encourage you to refer to it for any questions and researching other available options. Again, I cannot emphasize enough just how marvelous the PostgreSQL documentation is. The plethora of options available for the ALTER TABLE command is too exhaustive to be covered in one post. Regarding ALTER TABLE, I will touch base on a couple of the more commonly used commands to get you going. I will be using Xubuntu Linux 16.04.2 LTS (Xenial Xerus), PostgreSQL 9.6.2 and pdAdmin for these exercises. It by no means depicts actual data belonging to or being used by any party or organization. Note: All data, names or naming found within the database presented in this post, are strictly used for practice, instruction and testing purposes.

POSTGRESQL ALTER TABLE ONLY SERIES
Visit Part 1 of this series for a refresher of the material covered up to this point. INSERT statements will be introduced as well to populate an empty table with mock data. This blog post will demonstrate basic concepts of the ALTER TABLE command for changing an existing PostgreSQL table.
