FROM ORDERS
WHERE REP IN (107, 109, 101, 103)
NOT IN yordamida diapazonga "tegishli emaslikni " tekshirish mumkin.
Operator LIKE
LIKE ifodasi sintaksisi SQL92 standarti bo‘yicha quyidagi ko‘rinishga ega:
--- IMYA STOLBSA --------- LIKE (shablon) -----------------------------------
NOT ESCAPE (o‘tkazish nomi)
Sodda so‘rov bajaramiz: "Apelьsin" kompaniyasi uchun kredit limitini ko‘rsatish:
SELECT COMPANY, CREDIT_LIMIT
FROM CUSTOMERS
WHERE COMPANY = 'Apelьsin'
Quyidagicha '%' shablonli LIKE operatorini qo‘llaymiz:
SELECT COMPANY, CREDIT_LIMIT
FROM CUSTOMERS
WHERE COMPANY LIKE '%n'
Bu xolda LIKE '%n' operatori 'n' xarfiga tugaydigan xamma yozuvlarni ko‘rsatadi, agar '%' shabloni birinchi kelsa:
SELECT COMPANY, CREDIT_LIMIT
Do'stlaringiz bilan baham: |