Let's do some Replacements!








REPLACE

Syntax: REPLACE (var, var_to_replace [, replacement_string])

Parameters:
- var: Char/Varchar2/Number/Date Type
- var_to_replace: Char/Varchar2/Number/Date Type

Return Type: returns a string value.

Used Case: 
If manager want to know the Job title of the employees. However, in database, the job title are separated with underscore if the job title has two words. To make it more presentable, blank space should be used.

select first_name,job_id,replace(job_id,'_',' ')  from employees;




Comments

Popular posts from this blog

Let's learn Cross Join!

Full Outer Join!

Let's extract STRING!