Search code examples
postgresqlsql-likeconcatenationpostgresql-8.4

Postgresql 8.4 Like Concat


my query in postgresql 9.3 is:

SELECT *
    FROM route
    WHERE 'my/uri/address' LIKE CONCAT(c_uri, '%')

But in postgresql 8.4 this code not working.

How can i resolve, please?

Thanks in advance!


Solution

  • In PostgreSQL version 8.4 to String concatenation use || operation.

    Example:'Post' || 'greSQL'

    Result is: PostgreSQL