What is the CHARINDEX (SQL SERVER) equivalent in POSTGRESQL?

The equivalent function in postgresql is:

strpos(string, substring)

Or:

position(substring in string)

They are equivalent, just with different order in parameters.

If you also need parameter start_location, you will need to pass a substring to strpos.

You can find them in: https://www.postgresql.org/docs/current/functions-string.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)