Category: Oracle

Oracle Round

The Oracle ROUND(number) function returns n rounded to integer places to the right of the decimal point. The Oracle ROUND(date) function returns date rounded. Oracle ROUND (number) example select round(123.256) from dual; Result: '123' select round(123.256,0) from dual; Result: '123' select...

Oracle INSTR

The Oracle INSTR functions search string for substring. Oracle INSTR example select instr('Oracle Froms tutorial', 'e') from dual; Result: '6' select instr('Oracle Froms tutorial', 'e',1,1) from dual; Result: '6' select instr('Oracle Froms tutorial', 'a',1,2) from dual; Result: '20' select instr('Oracle Froms...

Oracle Decode

Oracle DECODE function compares expression to each search value one by one. If expression is equal to a search, then return the result. If no match is found, then returns default or null. Oracle Decode example SELECT name, decode(id, 1, 'Oracle9i',...

Oracle Exception

Oracle Exception The Oracle database contains the following types of exceptions: Internally defined are automatically raises by the runtime system. An internally defined exception always has an error code, but does not have a name. Predefined are internally defined exceptions that...

Oracle Cursors

Oracle Cursors The Oracle database contains two types of cursors: Implicit cursors are automatically constructed and managed by PL/SQL. PL/SQL opens an implicit cursor every time you run a SELECT or DML statement. The implicit cursor attributes are: SQL%ISOPEN SQL%FOUND SQL%NOTFOUND...