Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does LIKE '%%' mean in postgresql?

Tags:

sql

postgresql

What does '% %' mean in postgresql? Does it just mean LIKE '%'?

like image 923
TheMathNoob Avatar asked Sep 13 '26 06:09

TheMathNoob


2 Answers

'% %' means you are searching a String in a query with a " " space in any position. If the String don't have a space, It will not return anything.

If you want to search more about SQL Wildcard Operators, Just click the link.

like image 87
msagala25 Avatar answered Sep 14 '26 21:09

msagala25


The % is a wildcard that matches any character, and any number of characters. So a LIKE % matches everything. In your case, the LIKE '% %' matches anything that has a space in it.

like image 26
lucianopaz Avatar answered Sep 14 '26 22:09

lucianopaz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!