WHERE manzil IN (‘Navoiy', ‘Denov') Familiyasi Ismi Shahar --------------- --------------- ------------- Sultonov Javohir Navoiy SELECT ismi "Ismi", familyasi "Familyasi", manzil "City" FROM xodim WHERE manzil IN ('Marina', 'Edwardsville', 'St. Louis') ORDER BY manzil; Ismi Familyasi City --------------- --------------- ------------- Narziyev Asomiddin Denov Suvonov Nurbek Navoiy Sultonov Javohir Navoiy BETWEEN AND NOT BETWEEN
Oracle ikkita operatorni taqdim etadi: BETWEEN va BETWEEN EMAS, ular oddiygina so'rovdagi qiymatlar oralig'ini ko'rsatishi mumkin.
Bu AND mantiqiy operatoridan foydalanishni o'z ichiga olgan murakkabroq WHERE bandidan foydalanish zaruratini yo'q qiladi.
BETWEEN operatoridan foydalanish
The following query uses the AND logical operator.
SELECT ismi "Ismi", familyasi "Familyasi", maoshi "Maosh" FROM xodim WHERE maoshi >= 900 AND maoshi <= 4000 Ismi Familyasi Maosh -------------- --------------- ----------- Narziyev Asomiddin $1000 Suvonov Nurbek $3000 Sultonov Javohir $2000 BETWEEN operatoridan foydalanish
BETWEEN operatori yordamida so'rovni qayta yozish mumkin.
SELECT ismi "Ismi", familyasi "Familyasi", maoshi "Maosh" FROM xodim WHERE maoshi BETWEEN 1000 AND 3000 ORDER BY maoshi; Ismi Familyasi Maosh --------------- --------------- ----------- Narziyev Asomiddin $1000
Do'stlaringiz bilan baham: |