From f3ec115868efe49180a5d7580e2767a110cad6da Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 9 Mar 2014 22:12:59 -0400 Subject: [PATCH] lsqlthw ex12 --- lsqlthw-remnants/ex12.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lsqlthw-remnants/ex12.sql diff --git a/lsqlthw-remnants/ex12.sql b/lsqlthw-remnants/ex12.sql new file mode 100644 index 0000000..5888b47 --- /dev/null +++ b/lsqlthw-remnants/ex12.sql @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS person; + +CREATE TABLE person ( + id INTEGER PRIMARY KEY, + first_name TEXT, + last_name TEXT, + age INTEGER +); + +ALTER TABLE person RENAME TO peoples; + +ALTER TABLE peoples ADD COLUMN hatred INTEGER; + +ALTER TABLE peoples RENAME TO person; + +.schema person + +DROP TABLE person;