May 10, 2011

Difference between Transulate and Replace

REPLACE:
Replaces a character sequence in a string with a different set of characters.
TRANSLATE:
Translates single characters in a string to different characters.
e.g:
SELECT TRANSLATE('So What', 'aht', 'e') FROM dual;


SELECT REPLACE('So What', 'o', 'ome')FROM dual;




No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...