Q: Get row from database that has tag I have tags column in database separated by commas like that: "green, big, strong". I know it's not the best way to store tags in database, and I will change it later, but right now I really need to find out how to get row that has special tag.
For example, in the first row column tags is "green, big, strong". And in the second row is "white, big, strongy". 
When I use 
"SELECT * FROM tablename WHERE tags LIKE '%strong%'"

it returns the first and the second column (because of strongy), but I need only the first one

A: Limit output to 1 like so:
SELECT * FROM tablename WHERE tags LIKE '%strong%' LIMIT 1

Could also sort by specific column such as ID, like so:
SELECT * FROM tablename WHERE tags LIKE '%strong%' ORDER BY column_name LIMIT 1

Brackets specify a range when used with LIKE. You can use the ESCAPE keyword.
WHERE mycol LIKE '%\[126\]%' ESCAPE '\';

Of course if you are trying to match an exact string, you don't need LIKE, or you can drop the % characters and LIKE will behave like = (this makes it flexible to pass in wildcards or exact matches to a parameter).

A: I would do this as:
SELECT *
FROM tablename
WHERE ',' || tags || ',' LIKE '%,strong,%';

That is, just add the delimiters so the search is not ambiguous.
