0
Select REPLACE('123123tech', '123')
  From Dual;

Above is Oracle code but when I am going to find its alternative in PostgreSQL can't find a suitable function for that. PostgreSQL REPLACE function takes 3 arguments. I want a function who can take 2 arguments. Any solution ?

1
  • Oracle's REPLACE function also takes three arguments but the third is optional, which means that in your case, you want to remove the characters 123 from the source string. PostgreSQL has the same function but the third argument is not optional. So, as far as I can tell, there is no 2 argument function solution for you. Commented Feb 18, 2020 at 8:05

1 Answer 1

1

The way to do this in Postgresql is Select REPLACE('123123tech', '123','').

Best regards,
Bjarni

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.