Home > Back-end >  SQL query value (more char) longer then actual value in table
SQL query value (more char) longer then actual value in table

Time:09-16

I'm trying to query with Postgres a value where my query string (value) has more char than the actual value in the column:

| id | firstName|
|:---| :--------|
| 1  | bee      |
| 2  | beeWaxer |

so for example if I query beeWax, because beeWax has bee inside it I would like it to return also bee and also beeWaxer.

if I use a ILIKE operator it will only return beeWaxer (obviously):

SELECT * FROM table WHERE firstName ILIKE '           
  • Related