Like

like is used for pattern matching. It is char-oriented.

_ is used to match characters while % is used to match substrings.

For example,

SELECT * FROM Table WHERE name LIKE 'Ca%l';

This can match both Carl and Carol.

SELECT * FROM Table WHERE name LIKE 'Ca_l';

will only match Carl.

Last updated