MulaiMulai sekarang secara gratis

A review of the LIKE operator

The LIKE operator allows us to filter our queries by matching one or more characters in text data. By using the % wildcard we can match one or more characters in a string. This is useful when you want to return a result set that matches certain characteristics and can also be very helpful during exploratory data analysis or data cleansing tasks.

Let's explore how different usage of the % wildcard will return different results by looking at the film table of the Sakila DVD Rental database.

Latihan ini adalah bagian dari kursus

Functions for Manipulating Data in PostgreSQL

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

-- Select all columns
SELECT ___
FROM film
-- Select only records that begin with the word 'GOLD'
WHERE title ___ 'GOLD___';
Edit dan Jalankan Kode