summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--labs/2/README.md2
-rw-r--r--labs/2/run.sql2
2 files changed, 3 insertions, 1 deletions
diff --git a/labs/2/README.md b/labs/2/README.md
index 8a1e3f6..e513903 100644
--- a/labs/2/README.md
+++ b/labs/2/README.md
@@ -65,7 +65,7 @@ Indicates the name (Consumer Products, Industrial Products, and Research) and nu
Your solution should be simple and correct.
-* [ ] The company administration has decided to change the research department number from "12" to "14".
+* [x] The company administration has decided to change the research department number from "12" to "14".
Write an SQL query that performs this update.
Your query should make use of your trigger (from c) to ensure database integrity.
diff --git a/labs/2/run.sql b/labs/2/run.sql
index 3f32451..38aa0ef 100644
--- a/labs/2/run.sql
+++ b/labs/2/run.sql
@@ -95,3 +95,5 @@ CREATE TRIGGER update_sin AFTER UPDATE
FOR EACH ROW
WHEN (OLD.sin <> NEW.sin)
EXECUTE PROCEDURE update_referenced_sin_numbers();
+
+UPDATE departments SET dnumber = 14 where dnumber = 12;