You are on page 1of 17

Top 10 Features in Oracle 12c

(For Developers)

Vijay Mahawar
1

Top 10 Features in Oracle 12c (for Developers)

2/1/2014

Oracle Version History Year Oracle Version History Suffix Info Releases Desupport 2001 Oracle 9i ‘i’ stands for ‘internet’ R1 & R2 Jul 2008 (extn) 2004 Oracle 10g ‘g’ stands for ‘grid’ R1 & R2 R1 – Jan 2012 (extn) R2 – Jul 2013(extn) 2007 Oracle 11g ‘g’ stands for ‘grid’ R1 & R2 R1 – Aug 2015(extn) R2 – Jan 2015(full) 2013 Oracle 12c ‘c’ stands for ‘cloud ready’ Linux only N/A Understanding Oracle Database Releases Numbers 2 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .

Source: Oracle 12c Interactive Reference Guide from Oracle 3 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .

Top 10 Features in Oracle 12c (For Developers) 1. PL/SQL Unit Security 4 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 . Pluggable Databases 2. PL/SQL Functions Defined in the SQL WITH Clause 5. Duplicate Indexes 4. Invisible Columns 3.

NVARCHAR2. 8. 10. 5 Interval Reference Partitions INDENTITY columns Increased Size Limit for VARCHAR2. 9. 7. and RAW Data Types Booleans in Dynamic PL/SQL Implicit Result Sets Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .Top 10 Features in Oracle 12c (For Developers) 6.

net/blog/2013/07/07/oracle12c-pdb/ 6 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .Top 10 Features in Oracle 12c (For Developers) 1. Pluggable Databases: Source: http://mahawar.

This is possible by creating the duplicate indexes as invisible. 3. 2. 7 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .Top 10 Features in Oracle 12c (For Developers) Invisible Columns and Oracle 12c database allows to create columns which are invisible. Parameter used to control the usage of invisible indexes OPTIMIZER_USE_INVISIBLE_INDEXES. Duplicate Indexes: Now multiple indexes on the same set of columns is also possible.

WITH FUNCTION Funtion_Name(arg1 IN datatype) RETURN datatype IS BEGIN RETURN. END GET_TEXT.column2. 8 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 . For instance. 4. SELECT column1. WITH clause is enhanced to now include PL/SQL units. Refer demo scripts for working example.Top 10 Features in Oracle 12c (For Developers) PL/SQL Functions Defined in the SQL WITH Clause: In 12c. Function_Name(column3) FROM TABLE.

Now in 12c this can be changed to execute with invokers rights 5.Top 10 Features in Oracle 12c (For Developers) PL/SQL Unit Security: Oracle 12c now offers the users to override the default rights of function called from the view. 9 Before 12c In 12c Invoker Invoker View View Function (Views Owner Right) Function (BEQUEATH CURRENT_USER) Top 10 Features in Oracle 12c (for Developers) 2/1/2014 . the function executed with the rights of the views owner. Prior to 12c.

Interval-Ref Partitions: You can use interval partitioned tables as parent tables for reference partitioning.Top 10 Features in Oracle 12c (For Developers) 6. 10 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 . Partitions in a reference-partitioned table corresponding to interval partitions in the parent table are created when inserting records into the reference partitioned table.

102'). node_pub_ip VARCHAR2(15) UNIQUE.168.101'). Oracle offers multiple ways to generate unique values for table columns.Top 10 Features in Oracle 12c (For Developers) INDENTITY columns (auto-sequence on a PK). INSERT INTO plch_nodes(node_pub_ip) VALUES('192. Use of sequence is one of the most commonly used methods for this .and in Oracle Database 12c you can now call the NEXTVAL function to get that next unique value right within the default value for the column! CREATE TABLE plch_nodes ( node_name VARCHAR2(30) DEFAULT 'PLCH_RAC'|| plch_seq.168. INSERT INTO plch_nodes(node_pub_ip) VALUES('192. 7.NEXTVAL. Output: CONSTRAINT plch_nodes_pk PRIMARY KEY(node_name) ).2. can now use a sequence as a default. 11 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .2.

12 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 . 32767 bytes or characters if MAX_STRING_SIZE = EXTENDED 4000 bytes or characters if MAX_STRING_SIZE = STANDARD Note:You can change the value of MAX_STRING_SIZE from STANDARD to EXTENDED. Increased Size Limit for VARCHAR2. Minimum size is 1 byte or 1 character for VARCHAR2 but now the maximum size for VARCHAR2 and NVARCHAR2 depends on the parameter MAX_STRING_SIZE. NVARCHAR2. you cannot change the value of MAX_STRING_SIZE from EXTENDED to STANDARD. and RAW Data Types Change the setting of MAX_STRING_SIZE in the PDB to EXTENDED.Top 10 Features in Oracle 12c (For Developers) 8. However.

execute immediate 'begin are_you_happy(:a). end. end.Top 10 Features in Oracle 12c (For Developers) Booleans in dynamic PL/SQL : You can use booleans values in dynamic PL/SQL.' using FALSE. END. end if. / begin execute immediate 'begin are_you_happy(:a).put_line('Happy!').put_line('Not yet!').' using TRUE. Output: Happy! Not yet! END are_you_happy. else dbms_output. 9. create or replace procedure are_you_happy(p_bool IN BOOLEAN) IS BEGIN if p_bool then dbms_output. 13 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 . Boolean can be passed to the PL/SQL routines as bind variable.

Top 10 Features in Oracle 12c (For Developers) 10. BEGIN OPEN REF_CURSOR FOR SELECT EMPNO.RETURN_RESULT.DEPTNO FROM EMP. DBMS_SQL.RETURN_RESULT(REF_CURSOR). DECLARE REF_CURSOR SYS_REFCURSOR. / 14 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 . For Instance. This is made possible the Oracle procedure DBMS_SQL.ENAME. Implicit Result Sets: Oracle 12c now offers PLSQL Developers to display the result of sql query directly to the screen. END.

112/e10819/intro.com/cd/E11882_01/server.com/blogs/oracle-guide/my-top-10-oracle-database-12c-new-features-53280  Orafaq – Oracle Version History: - http://www.orafaq.com/wiki/Oracle_database  Oracle Documentation – About Oracle Release Numbers: - 15 http://docs.oracle.com/technetwork/issue-archive/2013/13-sep/o53plsql-1999801.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/poster/OUTPUT_p oster/poster.toolbox.html  Lewis Cunningham – Top Features in 12c: - http://it.html  PL/SQL Enhancements by Steven Feuerstein: - http://www.htm#i1008567 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .oracle.References  Oracle Database 12c: Interactive Quick Reference: - http://www.

Q &A 16 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .

Thanks You 17 Top 10 Features in Oracle 12c (for Developers) 2/1/2014 .