lsqlthw ex7

This commit is contained in:
Dan Buch 2014-03-09 15:31:02 -04:00
parent bf4f303f5a
commit 9bd505e7a3
2 changed files with 20 additions and 0 deletions

11
lsqlthw-remnants/ex7.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
set -x
rm -f ex3.db
sqlite3 ex3.db < ex2.sql
sqlite3 ex3.db < ex3.sql
sqlite3 ex3.db < ex4.sql
sqlite3 ex3.db < ex5.sql
sqlite3 ex3.db < ex6.sql
sqlite3 -echo ex3.db < ex7.sql

9
lsqlthw-remnants/ex7.sql Normal file
View File

@ -0,0 +1,9 @@
SELECT name, age FROM pet WHERE dead = 1;
DELETE FROM pet WHERE dead = 1;
SELECT * FROM pet;
INSERT INTO pet VALUES (1, "Gigantor", "Robot", 1, 0);
SELECT * FROM pet;