summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2021-12-13 22:33:04 +0400
committerAndrew <saintruler@gmail.com>2021-12-13 22:33:04 +0400
commit64aafe5ccdf4887f85cf29157e313fc992208f4c (patch)
tree67ab27271cfb16aa43795d6c093c407ac9e59e10
parent06121aef5ab01d39f2d89ce902c529ec78cb0912 (diff)
Сделал второе задание пятой лабы.
-rw-r--r--task5_views.sql20
1 files changed, 20 insertions, 0 deletions
diff --git a/task5_views.sql b/task5_views.sql
index 87d1ea3..15032de 100644
--- a/task5_views.sql
+++ b/task5_views.sql
@@ -56,6 +56,26 @@ GO
-- Задание 2 --
---------------
+CREATE VIEW BoxesView AS
+SELECT * FROM Boxes
+WHERE weight < 25 AND volume <= 1.1
+WITH CHECK OPTION
+GO
+
+DROP VIEW BoxesView
+GO
+
+INSERT INTO BoxesView (order_id, warehouse_id, wrapping_id, volume, weight)
+VALUES (1, 1, 1, 0.7, 13)
+GO
+
+INSERT INTO BoxesView (order_id, warehouse_id, wrapping_id, volume, weight)
+VALUES (1, 1, 1, 1.7, 13)
+GO
+
+INSERT INTO BoxesView (order_id, warehouse_id, wrapping_id, volume, weight)
+VALUES (1, 1, 1, 0.5, 27)
+GO
---------------
-- Задание 3 --