diff options
| author | Andrew <saintruler@gmail.com> | 2021-12-13 22:33:04 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2021-12-13 22:33:04 +0400 |
| commit | 64aafe5ccdf4887f85cf29157e313fc992208f4c (patch) | |
| tree | 67ab27271cfb16aa43795d6c093c407ac9e59e10 /task5_views.sql | |
| parent | 06121aef5ab01d39f2d89ce902c529ec78cb0912 (diff) | |
Сделал второе задание пятой лабы.
Diffstat (limited to 'task5_views.sql')
| -rw-r--r-- | task5_views.sql | 20 |
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 -- |