September 2017
Intermediate to advanced
240 pages
5h 57m
English
The word “administration” is overloaded in databases. It can mean “making sure a PostgreSQL server keeps running,” or it can mean “altering and migrating tables for new software deployments.” In this exercise I’m only covering how to do simple schema alterations and migrations. Managing a full database server is outside the scope of this book.
You’ve already encountered DROP TABLE as a way to get rid of a table you’ve created. I’m going to show you another way to use it and also how to add or remove columns from a table with ALTER TABLE.
ex12.sql
1 /* Only drop table if it exists. */ 2 DROP TABLE IF EXISTS person; 3 4 /* Create again to ...
Read now
Unlock full access