1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[SQL] How do I search "%" (percentage sign) in text using ILIKE operator in PostgreSQL...

Discussão em 'Outras Linguagens' iniciado por Stack, Setembro 18, 2025.

  1. Stack

    Stack Membro Participativo

    | id | text |
    |----|-------|
    | 1 | AB |
    | 2 | CD%EF |
    | 3 | GH |


    I have a text column in a table having a value with a "%" sign.

    I wanted to extract that value using the following query —

    SELECT text FORM table
    WHERE text ILIKE '%%%'


    expected Output should be:

    CD%EF
    1 {row}


    actual output returns:

    AB
    CD%EF
    GH
    3 {rows}

    Continue reading...

Compartilhe esta Página