Giriş
Açıklaması şöyle
ILIKE, a specific operator for PostgreSQL, has the same features as the LIKE operator but is case-insensitive. If special characters defined for the LIKE operator (% and _) are not found within the search text, ILIKE can be used as a case-insensitive equality operator. Although using it for equality checks is incorrect, ILIKE is the most suitable solution when case-insensitive pattern matching is desired.
Örnek
Şöyle yaparız.
SELECTDISTINCT(event_type)FROMstorm_eventsWHEREevent_type ILIKE '%winter%'
Örnek
Şöyle yaparız. İ
SELECT DISTINCT x.address ->> 'long_name' AS country_nameFROM (SELECT jsonb_array_elements(b.address) AS addressFROM brand bWHERE jsonb_typeof(b.address) = 'array' -- !!!) xWHERE x.address ->> 'types' ILIKE ANY (ARRAY['%country%'::text]);
Hiç yorum yok:
Yorum Gönder