Home > OS >  How to query keywords in a comment in postgresql
How to query keywords in a comment in postgresql

Time:10-05

I havea table with a string column:

    text
I have two cars
I have a big house

I want to query from this table only records that has the word cars

the expected output:

I have two cars

I tried:

select text from tlb
where text in ('cars') 

but it only returns exactly 'cars'

Postgresql V14

CodePudding user response:

LIKE operator could help.

select * from tlb where lower(texts) like '           
  • Related