From 64aafe5ccdf4887f85cf29157e313fc992208f4c Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 13 Dec 2021 22:33:04 +0400 Subject: =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D0=B5=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=8F=D1=82=D0=BE=D0=B9=20=D0=BB=D0=B0=D0=B1?= =?UTF-8?q?=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task5_views.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 -- -- cgit v1.2.3