Farid Rn
Farid Rn

Reputation: 3207

Write a query with "like" statement

I want to write a query that selects items that their titles are starting with an alphabet, something like:

select * from items where title like "A%";

But some of item names are starting with "A or 'A and I want to know if it's possible so my query contain all those forms of titles.

Upvotes: 0

Views: 155

Answers (2)

damiankolasa
damiankolasa

Reputation: 1500

Or you can use regexp if there are to many possibilities to OR them.

Upvotes: 0

triclosan
triclosan

Reputation: 5714

select * from items where title like 'A%' or title like '\'A%';

Upvotes: 1

Related Questions