Category: PL/SQL

PL/SQL Count

Oracle PL/SQL Count Function The Count function returns the number of rows in a query. The Count Function syntax: count( expression ) Example 1: Select count(e.empno) From emp e; Example 2: Select e.ename, count(distinct e.job) From emp e Where e.sal>1300 Group...

PL/SQL Concat II

Oracle PL/SQL Concat || Function The concat || operator allows us to concatenate 2 or more strings together. The || operator syntax: string1 || string2 || string_n Example: select 'PL' || ' SQL Tutorial' from dual; would return 'PL SQL Tutorial'...

PL/SQL Concat

Oracle PL/SQL Concat Function The concat function allows us to concatenate two strings together. The Concat Function syntax: concat( string1, string2 ) Example: select concat('PL', ' SQL Tutorial') from dual; would return 'PL SQL Tutorial' select concat('x', 'y') from dual; would...

PL/SQL Coalesce

Oracle PL/SQL Coalesce Function The Coalesce function returns the first non-null expression in the list. The Coalesce Function syntax: coalesce( exp1, exp2, … exp_n ) Example: SELECT coalesce( phone, email, address ) FROM customers;...

PL/SQL Chr

Oracle PL/SQL Chr Function The chr function returns the character based on the NUMBER code. Is the opposite of the ascii function. The Chr Function syntax: chr ( number ) Example: select chr(97) from dual; would return a select chr(65) from...