SELECT PName, Price, Manufacturer FROM Product WHERE Price > 100
Product
PName
Price
Manufacturer
SingleTouch
$149.99
Canon
MultiTouch
$203.99
Hitachi
“tanlash” and
“solishtirish”
LIKE operatori
% = Berkitilgan simvollar o`rnida qo`llaniladi.
SELECT * FROM Products WHERE PName LIKE ‘%gizmo%’
PName
Price
Category
Manufacturer
Gizmo
$19.99
Gadgets
GizmoWorks
Powergizmo
$29.99
Gadgets
GizmoWorks
SingleTouch
$149.99
Photography
Canon
MultiTouch
$203.99
Household
Hitachi
Product
PName
Price
Manufacturer
Powergizmo
$29.99
GizmoWork
“tanlash” and
“solishtirish”
SELECT Category
FROM Product
ORDER BY PName
PName
Price
Category
Manufacturer
Gizmo
$19.99
Gadgets
GizmoWorks
Powergizmo
$29.99
Gadgets
GizmoWorks
SingleTouch
$149.99
Photography
Canon
MultiTouch
$203.99
Household
Hitachi
?
SELECT DISTINCT category
FROM Product
ORDER BY category
SELECT DISTINCT category
FROM Product
ORDER BY PName
?
?
PName
Price
Category
Manufacturer
Gizmo
$19.99
Gadgets
GizmoWorks
Powergizmo
$29.99
Gadgets
GizmoWorks
SingleTouch
$149.99
Photography
Canon
MultiTouch
$203.99
Household
Hitachi
Product
Company
CName
StockPrice
Country
GizmoWorks
25
USA
Canon
65
Japan
Hitachi
15
Japan
Key
Foreign key
PName
Price
Category
Manufacturer
Gizmo
$19.99
Gadgets
GizmoWorks
Powergizmo
$29.99
Gadgets
GizmoWorks
SingleTouch
$149.99
Photography
Canon
MultiTouch
$203.99
Household
Hitachi
Product
Company
Cname
StockPrice
Country
GizmoWorks
25
USA
Canon
65
Japan
Hitachi
15
Japan
PName
Price
SingleTouch
$149.99
SELECT PName, Price FROM Product, Company WHERE Manufacturer=CName AND Country=‘Japan’ AND Price <= 200
UPDATE командаси жадвал сатрлари ёки мавжуд сатрни баъзи бир ёки барча майдонларини қийматини тиклаш, яъни ўзгартириш имконини беради. Масалан: UNIVERSITET1 жадвалидаги, барча университетларини рейтингини 200 қийматга ўзгартириш учун қуйидаги конструкцияни ишлатиш мумкин:
UPDATE командаси жадвал сатрлари ёки мавжуд сатрни баъзи бир ёки барча майдонларини қийматини тиклаш, яъни ўзгартириш имконини беради. Масалан: UNIVERSITET1 жадвалидаги, барча университетларини рейтингини 200 қийматга ўзгартириш учун қуйидаги конструкцияни ишлатиш мумкин: