ВУЗ:
Составители:
Рубрика:
Задание 1.6.9. Использование ключевых слов RIGHT OUTER JOIN для
связывания двух таблиц:
SELECT titleauthor.au_ord, titleauthor.royaltyper, authors.au_lname,
authors.au_fname
FROM titleauthor RIGHT OUTER JOIN authors
ON titleauthor.au_id = authors.au_id
WHERE (authors.state = 'CA')
Задание 1.6.10. Использование ключевых слов FULL OUTER JOIN для
связывания двух таблиц.
SELECT discounts.stor_id, discounts.discounttype, stores.stor_name
FROM discounts FULL OUTER JOIN stores
ON discounts.stor_id = stores.stor_id
Задание 1.6.11. Использование раздела WHERE оператора SELECT.
Select * From authors Where 3=6
Select * From authors Where state <> 'CA'
Declare @@Var1 int
Set @@Var1 = 4095
Select title_id, type, pub_id, price From titles
Where ((ytd_sales = @@Var1) OR
(price BETWEEN 5 AND 15))
Select discounts.stor_id, discounts.discounttype, stores.stor_name
From discounts, stores --здесь”,”-это CROSS JOIN
Where disscounts.stor_id = stores.stor_id --1 строка
Select discounts/stor_id, discounts.discounttype, stores.stor_name
From discounts INEER JOIN stores
ON discounts.stor_id = stores.stor_id
Select discounts.stor_id, discounts.discounttype, stores.stor_name
From discounts, stores
Where discounts.stor_id, *= stores.stor_id --3 строки
Select discounts.stor_id, discounts.disconttype, stores.stor_name
From discounts LEFT OUTER JOIN stores
ON discounts.stor_id = stores.stor_id --3 строки
Select discounts.stor_id, discounts.discounttype, stores.stor_name
Where discounts.stor_id =* stores.stor_id
Задание 1.6.9. Использование ключевых слов RIGHT OUTER JOIN для
связывания двух таблиц:
SELECT titleauthor.au_ord, titleauthor.royaltyper, authors.au_lname,
authors.au_fname
FROM titleauthor RIGHT OUTER JOIN authors
ON titleauthor.au_id = authors.au_id
WHERE (authors.state = 'CA')
Задание 1.6.10. Использование ключевых слов FULL OUTER JOIN для
связывания двух таблиц.
SELECT discounts.stor_id, discounts.discounttype, stores.stor_name
FROM discounts FULL OUTER JOIN stores
ON discounts.stor_id = stores.stor_id
Задание 1.6.11. Использование раздела WHERE оператора SELECT.
Select * From authors Where 3=6
Select * From authors Where state <> 'CA'
Declare @@Var1 int
Set @@Var1 = 4095
Select title_id, type, pub_id, price From titles
Where ((ytd_sales = @@Var1) OR
(price BETWEEN 5 AND 15))
Select discounts.stor_id, discounts.discounttype, stores.stor_name
From discounts, stores --здесь”,”-это CROSS JOIN
Where disscounts.stor_id = stores.stor_id --1 строка
Select discounts/stor_id, discounts.discounttype, stores.stor_name
From discounts INEER JOIN stores
ON discounts.stor_id = stores.stor_id
Select discounts.stor_id, discounts.discounttype, stores.stor_name
From discounts, stores
Where discounts.stor_id, *= stores.stor_id --3 строки
Select discounts.stor_id, discounts.disconttype, stores.stor_name
From discounts LEFT OUTER JOIN stores
ON discounts.stor_id = stores.stor_id --3 строки
Select discounts.stor_id, discounts.discounttype, stores.stor_name
Where discounts.stor_id =* stores.stor_id
Страницы
- « первая
- ‹ предыдущая
- …
- 106
- 107
- 108
- 109
- 110
- …
- следующая ›
- последняя »
