Joren Joren - 1 year ago 349
SQL Question

SQLite string contains other string query

How do I do this?

For example, if my column is "cats,dogs,birds" and I want to get any rows where column contains cats?

Answer Source

Using LIKE:

SELECT *
  FROM TABLE
 WHERE column LIKE '%cats%'