Replace function is use to replace a string to the string that we want. Replace function takes three parameter
Syntax of the replace function is:-
REPLACE ('STRING1','STRING2','STRING3');
Here:-
STRING1 is the values from which you need to replace a string.
STRING2 is the value by which you need to replace a string.
STRING3 is the values which is going to be replaced.
Example is:-
SQL> COLUMN O_REPLACE FORMAT A10
SQL> SELECT REPLACE ('MYSELF','MY','') O_REPLACE FROM DUAL;
O_REPLACE
----------
SELF
SQL> SELECT REPLACE ('MYSELF123','123',' CHANCHAL.') O_REPLACE FROM DUAL;
O_REPLACE
----------------
MYSELF CHANCHAL.
Read Also:- Replace in MySql
Syntax of the replace function is:-
REPLACE ('STRING1','STRING2','STRING3');
Here:-
STRING1 is the values from which you need to replace a string.
STRING2 is the value by which you need to replace a string.
STRING3 is the values which is going to be replaced.
Example is:-
SQL> COLUMN O_REPLACE FORMAT A10
SQL> SELECT REPLACE ('MYSELF','MY','') O_REPLACE FROM DUAL;
O_REPLACE
----------
SELF
SQL> SELECT REPLACE ('MYSELF123','123',' CHANCHAL.') O_REPLACE FROM DUAL;
O_REPLACE
----------------
MYSELF CHANCHAL.
Read Also:- Replace in MySql
No comments:
Post a Comment