From today onwards I am going to share something technical like “tip of the day” in a daily basis. i will try to make it daily.
select ascii(‘K’) from dual
This ascii function returns ascii value for the given value.
select asciistr(‘Ä Ê Í Õ’) from dual
This function converts a string in any character set to an ASCII string using the database character set. The output of this query will be “\00C4 \00CA \00CD \00D5”
select chr(100) from dual
This function returns the character for the given ascii value. it is just opposite to ascii function.
select compose(‘o’ || unistr(‘\0308’) ) from dual
This function returns the unicode value for the given character
select concat(‘karthi’, ‘keyan’) from dual
select ‘karthi’||’keyan’ from dual
The above two functions are used for concatenation
select dump(‘NGK’) from dual
This function returns data type, length and internal representation of it.
select initcap(‘i like the way i am’) from dual
This capitalizes the initial character from each word in the sentence
select instr(‘karthi’,’a’,1) from dual
This returns the position of the given substring from the input string. Here the argument 1 will try to match its first occurence.
select lpad(‘7′,3,’0’) from dual
This function returns ‘007’. It pads zero on the left side.
select ltrim(‘ karthi’) from dual
This function trims spaces on the left side