- •Лабораторная работа №2 по курсу субд oracle Введение
- •Задание
- •Составить и выполнить команды select
- •Примеры
- •13 Rows selected.
- •13 Rows selected.
- •13 Rows selected.
- •3.5" Floppy Disk 10
- •13 Rows selected.
- •3.5" Floppy Disk 10
- •12 Rows selected.
- •2 Where (price between 10 and 60) and (price not in (10,60));
- •3.5" Floppy Disk 10 30
- •11 Rows selected.
- •3.5" Floppy Disk
- •11 Rows selected.
- •3.5" Floppy Disk 10
- •14 Rows selected.
- •14 Rows selected.
2 Where (price between 10 and 60) and (price not in (10,60));
NAME PRICE
------------------------- ----------
CD-RW Disk 20
CD-R Disk 15
Milk 1 lt. 20
SQL>
SQL> -- использование оператора IS NULL для обработки NULL значений
SQL> SELECT name, price, quantity FROM product WHERE quantity IS NULL;
NAME PRICE QUANTITY
------------------------- ---------- ----------
Blue Ink Marker 80
Milk 1 lt. 20
Milk 3 lt. 60
SQL> SELECT name, price, quantity FROM product WHERE NOT (quantity IS NULL);
NAME PRICE QUANTITY
------------------------- ---------- ----------
CD-RW Disk 20 100
CD-R Disk 15 200
3.5" Floppy Disk 10 30
DVD-R Disk 80 10
DVD+R Disk 80 10
DVD-RW Disk 300 5
DVD+RW Disk 300 5
Red Ink Marker 60 10
Green Ink Marker 60 10
Blue Ink Marker 60 10
Milk 3 lt. 65 5
11 Rows selected.
SQL> SELECT name FROM product WHERE quantity IS NULL;
NAME
-------------------------
Blue Ink Marker
Milk 1 lt.
Milk 3 lt.
SQL> SELECT name FROM product WHERE quantity IS NOT NULL;
NAME
-------------------------
CD-RW Disk
CD-R Disk