Oracle. PL/SQL Procedural Language

Size: px
Start display at page:

Download "Oracle. PL/SQL Procedural Language"

Transcription

1 PL/SQL Procedural Language based on Günther Stürner: 7 - A User s and Developer s Guide Michael R. Ault: 7.0 Administration & Management R2 manuals Feuerstein et al: PL/SQL Language Application Processing PL/SQL Block Database Server Database PL/SQL block declare begin exception end; PL/SQL engine SQL engine DB engine Stored PL/SQL procedures / functions 1

2 PL/SQL in Client/Server /* calling a stored PL/SQL program */ exec sql execute begin abc (:x, :y, :z); end; end exec; sql sql proc appl. devel. tool PL/SQL engine Sqlplus Applications... Forms... Database Server PL/SQL engine SQL processor & DB engine abc Config file SET.. SQL*Plus Sqlplus commands (see SQL*Plus manuals) sqlplus Spool File declare x. y z begin abc (x, y, z); PL/SQL engine Native SQL PL/SQL language (see PL/SQL manuals) Database Server (instance) SQL processor & DB engine (see SQL Reference manual) PL/SQL abc 2

3 isql*plus ks SQL*Plus User s Guide and Reference isql*plus Help 3

4 Types of PL/SQL programs 4GL procedures or functions client side triggers of Forms, Menu, Reports Anonymous PL/SQL blocks 3GL embedded SQL SQL*Plus scripts (host or client) Stored PL/SQL programs Created procedures, functions, packages stored in database in compiled form Database triggers (remote operations secured by 2PC) Declarative part Variable and constant declarations SQL datatypes, with NOT NULL constraint and initial value PL/SQL datatypes, arrays and records Cursor definitions Declare c1 (<parameters>) select <parameters>; User-defined exceptions myexception exception; max_op_cursors exception; user defined error names overriding error codes Pragma definitions (compiler directives) pragma exception_init( max_op_cursors, -1000) RESTRICT_REFERENCES SERIALLY_REUSABLE AUTONOMOUS_TRANSACTION 4

5 Identifiers, variables Identifiers: Names of PL/SQL objects: constants, variables, labels, exceptions, functions, procedures, cursors, record types,... Consists of letter, digits 0..9, dollar sign ($), underscore (_), number sign (#) Cannot include whitespaces (space, tab, carriage return) Must start with a letter A..Z Not case-sensitive (except quoted identifiers) Up to 30 characters long Declaring variables: <variable name> <datatype> [CONSTANT] [NOT NULL] [ {:= DEFAULT} <initial value> ] ; Delimiters In addition to typical SQL delimiters ** exponentiation concatenation := assignment = equal to <>!= not equal to ^= ~= << >> label : host variable % attribute indicator / anchoring %TYPE {<cursor> <table>}%rowtype remote database indicator.. Range indicator => named parameter assignment <parameter> => <value> 5

6 Predefined PL/SQL Datatypes Number Types NUMBER (SQL, fixed point 38 digits or floating point in range [1E E126) ) BINARY_FLOAT, BINARY_DOUBLE (IEEE compatible) BINARY_INTEGER and subtypes (PL/SQL only) NATURAL, NATURALN, POSITIVE, POSITIVEN, SIGNTYPE ISO compatible subtypes INT[EGER], SMALLINT, DEC[IMAL] (will map into SQL NUMBER) FLOAT, REAL, DOUBLE PRECISION (will map to SQL FLOAT) Character Types and Large Objects CHAR[ACTER], NCHAR[ACTER], VARCHAR[2], NVARCHAR[2] LONG, LONG RAW, RAW, ROWID, UROWID BLOB, CLOB, NCLOB, XMLType (SQL) Boolean Types BOOLEAN (PL/SQL only) Date, Time and Interval Types DATE, TIMESTAMP [WITH [LOCAL] TIMEZONE] (SQL) INTERVAL YEAR TO MONTH, INTERVAL DAY TO SECOND.. datatypes, records, collections, arrays Data type copy myvar1 employee.emp_name%type; myvar2 myvar1%type; Row type copy of columns and data types for a record emp_rec employee%rowtype; emp_rec.salary := 1000; Single dimensional arrays type string_arr is table of varchar2(100) indexed by binary_integer; textline string_arr ; Associative Arrays ( index-by tables) Nested Tables Varrays variable-size arrays 6

7 Examples:.. Records TYPE emp_rec_type IS RECORD ( no smallint, name varchar2(50), birthdate date ) ; emp_rec emp_rec_type; emp_rec.no := 100; emp_rec.name := 'Jones Tom'; emp_rec.birthdate := to_date (' ', 'YYYY-MM-DD'); Executable part Assignments variable := value expression SELECT column[s] INTO variable[s] FROM FETCH cursor INTO variable[s] Conditional processing IF THEN ELSE END IF Unconditional branching GOTO label <<label>> Loop structures LOOP END LOOP EXIT WHEN condition FOR END LOOP FORALL i IN 1..imax <statement> WHILE END LOOP Cursor loops Cursor control EXECUTE IMMEDIATE SQL-statement-string Raising exceptions 7

8 Native Dynamic SQL EXECUTE IMMEDIATE <SQL statement string> [ INTO { <define variable list> <record> <object variable> } ] [ USING [ IN OUT IN OUT ] <bind argument list> ] ; Note: bind parameters allowed only just like in embedded SQL. For object names etc use concatenation of VARCHAR2 values. Example: DECLARE deptname VARCHAR2(14) := 'Development'; location VARCHAR2(13) := 'Helsinki'; BEGIN EXECUTE IMMEDIATE 'insert into dept (deptno,dname,loc) ' 'values (:1, :2, :3) ' USING 50, deptname, location; END; Cursor processing Cursor status attributes: %FOUND %NOTFOUND %ROWCOUNT %ISOPEN Examples: if c1%found then if c1%isopen then DECLARE cursor C1 is select * from T order by ; c1_rec C1%rowtype; BEGIN open C1; loop fetch C1 into c1_rec; exit when C1%notfound; end loop; total_count := C1%rowcount; close C1; 8

9 Cursor FOR loop FOR <record> IN { <cursor name> (SELECT ) } LOOP <executable statements> END LOOP ; <record> is defined automatically as <cursor name>%rowtype FOR loop does automatically cursor open, fetch, and close operations Example: FOR emp_rec IN SELECT * FROM emp LOOP IF emp_rec.dept = 'D123' THEN salary_raise(emp_rec.emp_id, 15) ; END IF ; END LOOP ; Raising Exceptions Exception can be raised by PL/SQL engine RAISE statement RAISE <exception name> calling RAISE_APPLICATION_ERROR Exception handler can process and then re-raise the current exception by RAISE ; 9

10 Exception Handling BEGIN EXCEPTION When <exception name> then <statements>... When OTHERS then err_code := sqlcode; err_text := sqlerrm; insert into program_errors (error_code, error_text, error_time) values (err_code, err_text, sysdate); END; After exception processing the PL/SQL block is ended and control returns to the calling module or next statement after the END in case of local exceptions of a BEGIN-END block. Exceptions with PL/SQL mnemonics Exception name: for error code: Source: Stürner, 7 Cursor_already_open ORA dup_val_on_index ORA invalid_cursor ORA invalid_number ORA login_defined ORA no_data_found ORA not_logged_on ORA program_error ORA storage_error ORA timeout_on_resource ORA too_many_rows ORA transaction_backed_out ORA value_error ORA zero_divide ORA for the updated list with corresponding sqlcode values and explantions see PL/SQL User s Guide and Reference 10

11 Autonomous Transactions PROCEDURE main IS BEGIN INSERT ; My_at_proc ; UPDATE ; COMMIT; END; PROCEDURE My_at_proc IS PRAGMA AUTONOMOUS_TRANSACTION; BEGIN INSERT ; UPDATE ; DELET ; COMMIT; END; Changes in main transaction are not visible in the AT-transaction, but changes committed in the AT-transaction are visible in the calling transaction (even if it started after the main transaction) and other transactions. Developing a stand-alone procedure Create or Replace function/procedure p... Show errors function/procedure p PL/SQL compiler SQL processor Data Dictionary Error$ -tables Database object definitions Source / code Compiled code Status Dependencies 11

12 Create Function SQL > CREATE OR REPLACE FUNCTION <fname> (p1 <datatype>, p2<datatype>, ) RETURN <datatype> IS <PL/SQL block> The PL/SQL code is compiled by PL/SQL compiler parsed by SQL-processor and stored in the data dictionary Any errors are stored in the data dictionary table Error$ to accessed by views USER_ERRORS, ALL_ERRORS or DBA_ERRORS or SQL> SHOW ERRORS FUNCTION <fname> An example function SQL> CREATE OR REPLACE FUNCTION DayOfWeek (indate IN DATE) 2 RETURN SMALLINT 3 IS BEGIN 4 RETURN TO_NUMBER(TO_CHAR(indate,'D')); 5 END; 6 / Function created. SQL> SELECT DayOfWeek(SYSDATE) FROM DUAL; DAYOFWEEK(SYSDATE) Note: DUAL is a virtual single line table which is typically used for reporting current system data 12

13 Create Procedure SQL: CREATE OR REPLACE PROCEDURE <pname> (p1 IN <datatype>, p2 OUT <datatype>, ) IS <PL/SQL block> For full syntax see the SQL Reference manual SQL> SHOW ERRORS or SQL> SHOW ERRORS PROCEDURE <pname> or SQL> select * from user_errors where name = <pname> ; Create Trigger CREATE OR REPLACE <trigger name> { BEFORE AFTER INSTEAD OF} { {<trigger event> ON { NESTED TABLE <nested_table_column> OF <view> <table> <view>} [ <referencing clause> ] [FOR EACH ROW [WHEN <trigger condition> ] ] } <trigger event> ON DATABASE } <trigger body> ; INSERT UPDATE DELETE CREATE ALTER DROP LOGON LOGOF START SHUTDOWN SERVERERROR 13

14 Triggered RowVersioning CREATE TABLE VersionTest ( id INT, -- primary key s VARCHAR2(20), -- data columns.. rv NUMBER DEFAULT 0, -- reserved for triggered RowVersioning CONSTRAINT PK_VersionTest PRIMARY KEY (id) ) ; CREATE OR REPLACE TRIGGER TRG_VersionTest BEFORE UPDATE ON VersionTest FOR EACH ROW BEGIN :NEW.rv := :OLD.rv + 1; END; / PL/SQL Packages Encapsulation of modules Administration of procedures Managing access privileges Declaring global variables and constants available in the same session Hiding private procedures,.. Overloading 14

15 Specification part declaring the visible objects Creating the code and hidden objects Initialization block to be executed on the first call by a new user Creating PL/SQL Package Create or Replace Package pack1 as procedure p1 (a in number, ); function f1 (af in number) return number; var_1 ; my_ex exception; cursor c1; end pack1; Create or Replace Package Body pack1 as procedure p1 (a in number, ); <code> function f1 (af in number) return number; <code> procedure p_private ( ); <code> begin var_1 := <value>;... end pack1; Builtin Packages - Feuerstein 96 - PL/SQL packages DBMS_ALERT Notifications of database events DBMS_DDL Interface to some SQL DDL statements DBMS_JOB Automatic submitting of scheduled database tasks DBMS_LOCK Interface for user defined locks using OLM DBMS_MAIL Interface to Mail ( <= 9) DBMS_OUTPUT Messaging from PL/SQL programs DBMS_PIPE ShMem messaging between sessions DBMS_SESSION Interface to session level commands DBMS_SQL Dynamic SQL from PL/SQL DBMS_TRANSACTION Interface for transaction options DBMS_UTILITY Miscellaneous PL/SQL routines DBMS_JAVA see Database Java Developer's Guide. 15

16 .. Builtin Packages DBMS_STREAMS DBMS_XDB DBMS_XML... DBMS_RLS... HTF functions generating HTML tags HTP procedures generating HTML tags OWA_... Web API, cookies etc SDO_... Spatial Data Objects? UTL_FILE reading and writing op-sys files UTL_HTTP communicating with Web servers UTL_SMTP communicating with mail servers Debugging with DBMS_OUTPUT dbms_output.enable (<buffersize>); dbms_output. put (var); put_line(var); new_line; Database Cache Pipe dbms_output.disable; SQL> set serveroutput on SQL> execute <proc> ; <lines displayed on the terminal> dbms_output. get_line (line,status); get_lines (lines, numlines, status); 16

17 DBMS_PIPE session A Database Cache session B dbms_pipe. reset_buffer pack_message(ov); send_message(f); Pipe dbms_pipe. receive_message(ov) unpack:message(ov) DBMS_MAIL transaction Select update.... dbms_mail.send.. Commit / Rollback After successful commit 17

18 DBMS_LOCK Package for explicit locking (by integer values) user defined locks between Allocate_unique - name associated for integers Request - request a lock with a given mode Convert - convert the mode of a lock Sleep (secs) - suspend the session for a given period of time Release - releasing the lock A better Sleep ( ) CONNECT System@ORCL -- Source: 10g R2 PL/SQL User's Guide and Reference CREATE PROCEDURE java_sleep (milli_seconds IN NUMBER) AS LANGUAGE JAVA NAME 'java.lang.thread.sleep(long)'; / CREATE PROCEDURE sleep (seconds IN NUMBER) IS BEGIN java_sleep (seconds * 1000); END; / CREATE PUBLIC SYNONYM java_sleep FOR system.java_sleep; CREATE PUBLIC SYNONYM sleep FOR system.sleep; / GRANT EXECUTE ON java_sleep TO PUBLIC; GRANT EXECUTE ON sleep TO PUBLIC; / CALL sleep(10); 18

PLSQL 9i Index. Section Title Page

PLSQL 9i Index. Section Title Page One PLSQL Introduction 2 Procedural Language for SQL 3 Two PLSQL Structure 5 Basic Structure of PLSQL 6 The Declaration Section in PLSQL 7 Local Variables in PLSQL 8 Naming Local Variables in PLSQL 10

More information

ORACLE: PL/SQL Programming

ORACLE: PL/SQL Programming %ROWTYPE Attribute... 4:23 %ROWTYPE... 2:6 %TYPE... 2:6 %TYPE Attribute... 4:22 A Actual Parameters... 9:7 Actual versus Formal Parameters... 9:7 Aliases... 8:10 Anonymous Blocks... 3:1 Assigning Collection

More information

Question: Which statement would you use to invoke a stored procedure in isql*plus?

Question: Which statement would you use to invoke a stored procedure in isql*plus? What are the two types of subprograms? procedure and function Which statement would you use to invoke a stored procedure in isql*plus? EXECUTE Which SQL statement allows a privileged user to assign privileges

More information

Index. Boolean expression, , Business rules enforcement. see Declarative constraints table with Oracle constraints and,

Index. Boolean expression, , Business rules enforcement. see Declarative constraints table with Oracle constraints and, Index ABS numeric function, 355 Active State Perl, SQL*Plus with, 61 ADD_MONTHS, 360 AFTER DELETE ROW trigger, 202 AFTER DELETE STATEMENT trigger, 202 AFTER-INSERT-ROW (AIR) trigger, 172 174, 177, 179

More information

UNIT II PL / SQL AND TRIGGERS

UNIT II PL / SQL AND TRIGGERS UNIT II PL / SQL AND 1 TRIGGERS TOPIC TO BE COVERED.. 2.1 Basics of PL / SQL 2.2 Datatypes 2.3 Advantages 2.4 Control Structures : Conditional, Iterative, Sequential 2.5 Exceptions: Predefined Exceptions,User

More information

Banner Oracle PL/SQL and Database Objects Training Workbook

Banner Oracle PL/SQL and Database Objects Training Workbook Banner Oracle PL/SQL and Database Objects Training Workbook January 2007 Using Oracle for Banner 7 HIGHER EDUCATION What can we help you achieve? Confidential Business Information -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

More information

PL/SQL. Exception. When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number

PL/SQL. Exception. When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number PL/SQL Exception When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number Exceptions must be handled by name. PL/SQL predefines some common Oracle

More information

"Charting the Course... Oracle 18c PL/SQL (5 Day) Course Summary

Charting the Course... Oracle 18c PL/SQL (5 Day) Course Summary Course Summary Description This course provides a complete, hands-on, comprehensive introduction to PL/SQL including the use of both SQL Developer and SQL*Plus. This coverage is appropriate for both Oracle11g

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline

More information

Meet MariaDB Vicențiu Ciorbaru Software MariaDB Foundation * * 2017 MariaDB Foundation

Meet MariaDB Vicențiu Ciorbaru Software MariaDB Foundation * * 2017 MariaDB Foundation Meet MariaDB 10.3 Vicențiu Ciorbaru Software Engineer @ MariaDB Foundation vicentiu@mariadb.org * * What is MariaDB? MariaDB 5.1 (Feb 2010) - Making builds free MariaDB 5.2 (Nov 2010) - Community features

More information

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL]

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL] Chapter Overview of PL/SQL Programs Control Statements Using Loops within PLSQL Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL] Table of Contents Describe a PL/SQL program construct List the

More information

5. Single-row function

5. Single-row function 1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 11g: Program with PL/ SQL. Version: Demo

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 11g: Program with PL/ SQL. Version: Demo Vendor: Oracle Exam Code: 1Z0-144 Exam Name: Oracle Database 11g: Program with PL/ SQL Version: Demo QUESTION NO: 1 View the Exhibit to examine the PL/SQL code: SREVROUPUT is on for the session. Which

More information

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led Course Description This training starts with an introduction to PL/SQL and then explores the benefits of this powerful programming

More information

Contents I Introduction 1 Introduction to PL/SQL iii

Contents I Introduction 1 Introduction to PL/SQL iii Contents I Introduction Lesson Objectives I-2 Course Objectives I-3 Human Resources (HR) Schema for This Course I-4 Course Agenda I-5 Class Account Information I-6 Appendixes Used in This Course I-7 PL/SQL

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL Trapping Oracle Server Exceptions 1 Copyright 2013, Oracle and/or its affiliates. All rights Objectives This lesson covers the following objectives: Describe and provide

More information

Oracle Database 11g: Program with PL/SQL Release 2

Oracle Database 11g: Program with PL/SQL Release 2 Oracle University Contact Us: +41- (0) 56 483 31 31 Oracle Database 11g: Program with PL/SQL Release 2 Duration: 5 Days What you will learn This course introduces students to PL/SQL and helps them understand

More information

PL/SQL Block structure

PL/SQL Block structure PL/SQL Introduction Disadvantage of SQL: 1. SQL does t have any procedural capabilities. SQL does t provide the programming technique of conditional checking, looping and branching that is vital for data

More information

Table of Contents. Oracle SQL PL/SQL Training Courses

Table of Contents. Oracle SQL PL/SQL Training Courses Table of Contents Overview... 7 About DBA University, Inc.... 7 Eligibility... 8 Pricing... 8 Course Topics... 8 Relational database design... 8 1.1. Computer Database Concepts... 9 1.2. Relational Database

More information

Oracle Database: Program with PL/SQL

Oracle Database: Program with PL/SQL Oracle University Contact Us: + 420 2 2143 8459 Oracle Database: Program with PL/SQL Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction

More information

Oracle Database: Program with PL/SQL Ed 2

Oracle Database: Program with PL/SQL Ed 2 Oracle University Contact Us: +38 61 5888 820 Oracle Database: Program with PL/SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction

More information

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7 Table of Contents Spis treści 1 Introduction 1 2 PLSQL - fundamentals 1 2.1 Variables and Constants............................ 2 2.2 Operators.................................... 5 2.3 SQL in PLSQL.................................

More information

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days This Database Program with PL/SQL training shows you how to develop stored procedures, functions, packages and database triggers. You'll

More information

Conditionally control code flow (loops, control structures). Create stored procedures and functions.

Conditionally control code flow (loops, control structures). Create stored procedures and functions. TEMARIO Oracle Database: Program with PL/SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction to PL/SQL and then explores the benefits

More information

IZ0-144Oracle 11g PL/SQL Certification (OCA) training

IZ0-144Oracle 11g PL/SQL Certification (OCA) training IZ0-144Oracle 11g PL/SQL Certification (OCA) training Advanced topics covered in this course: Managing Dependencies of PL/SQL Objects Direct and Indirect Dependencies Using the PL/SQL Compiler Conditional

More information

Oracle12c Release 1 PL/SQL (3 Days)

Oracle12c Release 1 PL/SQL (3 Days) Oracle12c Release 1 PL/SQL (3 Days) www.peaklearningllc.com Course Description This course provides a complete, hands-on, comprehensive introduction to PL/SQL including the use of both SQL Developer and

More information

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant Oracle Developer Track Course Contents Sandeep M Shinde Oracle Application Techno-Functional Consultant 16 Years MNC Experience in India and USA Trainer Experience Summary:- Sandeep M Shinde is having

More information

Oracle PLSQL Training Syllabus

Oracle PLSQL Training Syllabus Oracle PLSQL Training Syllabus Introduction Course Objectives Course Agenda Human Resources (HR) Schema Introduction to SQL Developer Introduction to PL/SQL PL/SQL Overview Benefits of PL/SQL Subprograms

More information

PLSQL Interview Questions :

PLSQL Interview Questions : PLSQL Interview Questions : In my previous articles I have explained the SQL interview questions,bi Interview questions which will give the best idea about the question that may ask in interview.in this

More information

Oracle Database: Program with PL/SQL

Oracle Database: Program with PL/SQL Oracle University Contact Us: Local: 1800 425 8877 Intl: +91 80 4108 4700 Oracle Database: Program with PL/SQL Duration: 50 Hours What you will learn This course introduces students to PL/SQL and helps

More information

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger?

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? Page 1 of 80 Item: 1 (Ref:1z0-147e.9.2.4) When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? nmlkj ON nmlkj OFF nmlkj

More information

Oracle - Oracle Database: Program with PL/SQL Ed 2

Oracle - Oracle Database: Program with PL/SQL Ed 2 Oracle - Oracle Database: Program with PL/SQL Ed 2 Code: Lengt h: URL: DB-PLSQL 5 days View Online This Oracle Database: Program with PL/SQL training starts with an introduction to PL/SQL and then explores

More information

1Z Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions

1Z Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions 1Z0-144 Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-144 Exam on Oracle Database 11g - Program with PL/SQL... 2 Oracle 1Z0-144 Certification

More information

Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint

Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint Preface p. xv Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint Clauses p. 7 Sample Database p. 9 A Quick

More information

Slides by: Ms. Shree Jaswal

Slides by: Ms. Shree Jaswal Slides by: Ms. Shree Jaswal A trigger is a statement that is executed automatically by the system as a side effect of a modification to the database. To design a trigger mechanism, we must: Specify the

More information

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia 1. Creating a Database Alias 2. Introduction to SQL Relational Database Concept Definition of Relational Database

More information

PL / SQL Basics. Chapter 3

PL / SQL Basics. Chapter 3 PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic

More information

1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL

1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL CertBus.com 1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL Pass Oracle 1Z0-144 Exam with 100% Guarantee Free Download Real Questions & Answers PDF and VCE file from: 100% Passing Guarantee 100%

More information

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus ORACLE TRAINING ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL Oracle SQL Training Syllabus Introduction to Oracle Database List the features of Oracle Database 11g Discuss the basic design, theoretical,

More information

Oracle EXAM 1Z0-144 Oracle Database 11g: Program with PL/SQL

Oracle EXAM 1Z0-144 Oracle Database 11g: Program with PL/SQL Oracle EXAM 1Z0-144 Oracle Database 11g: Program with PL/SQL Total Questions: 80 Question: 1 View the Exhibit to examine the PL/SQL code: SREVROUPUT is on for the session. Which statement Is true about

More information

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Table of Contents. PDF created with FinePrint pdffactory Pro trial version Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.

More information

1Z0-144.v Number: 1Z0-144 Passing Score: 800 Time Limit: 120 min File Version:

1Z0-144.v Number: 1Z0-144 Passing Score: 800 Time Limit: 120 min File Version: 1Z0-144.v12.39 Number: 1Z0-144 Passing Score: 800 Time Limit: 120 min File Version: 12.39 http://www.gratisexam.com/ Vendor: Oracle Exam Code: 1Z0-144 Exam Name: Oracle Database 11g: Program with PL/SQL

More information

Oracle Database 11g: Program with PL/SQL

Oracle Database 11g: Program with PL/SQL Oracle University Contact: +31 (0)30 669 9244 Oracle Database 11g: Program with PL/SQL Duration: 5 Dagen What you will learn This course introduces students to PL/SQL and helps them understand the benefits

More information

Sisteme Informatice şi Standarde Deschise (SISD) Curs 7 Standarde pentru programarea bazelor de date (1)

Sisteme Informatice şi Standarde Deschise (SISD) Curs 7 Standarde pentru programarea bazelor de date (1) Administrarea Bazelor de Date Managementul în Tehnologia Informaţiei Sisteme Informatice şi Standarde Deschise (SISD) 2009-2010 Curs 7 Standarde pentru programarea bazelor de date (1) 23.11.2009 Sisteme

More information

Part 18: Application Programming II (Stored Procedures,Triggers)

Part 18: Application Programming II (Stored Procedures,Triggers) 18. Application Programming II (Stored Procedures, Triggers) 18-1 Part 18: Application Programming II (Stored Procedures,Triggers) References: Elmasri/Navathe: Fundamentals of Database Systems, 3rd Edition,

More information

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine. 1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent

More information

to use this Student Guide

to use this Student Guide Oracle Database 10g: Advanced PL/SQL Student Guide D17220GC10 Edition 1.0 June 2004 D39598 Authors Nancy Greenberg Aniket Raut Technical Contributors and Reviewers Andrew Brannigan Christoph Burandt Dairy

More information

Oracle Database: Introduction to SQL/PLSQL Accelerated

Oracle Database: Introduction to SQL/PLSQL Accelerated Oracle University Contact Us: Landline: +91 80 67863899 Toll Free: 0008004401672 Oracle Database: Introduction to SQL/PLSQL Accelerated Duration: 5 Days What you will learn This Introduction to SQL/PLSQL

More information

Oracle Class VI. Exception Block Cursors For Loops

Oracle Class VI. Exception Block Cursors For Loops Oracle Class VI Exception Block Cursors For Loops Pl/sql some more basics Loop through records, manipulating them one at a time. Keep code secure by offering encryption, and storing code permanently on

More information

Break Free from Oracle, leveraging your existing Oracle skills!

Break Free from Oracle, leveraging your existing Oracle skills! Break Free from Oracle, leveraging your existing Oracle skills! Information Management 2013 IBM Corporation Migration Challenges Transact-SQL Oracle SQL and PL/SQL DB2's SQL/PL (based on SQL/PSM) Applications

More information

Lab # 4. Data Definition Language (DDL)

Lab # 4. Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with

More information

RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague

RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague course: Database Applications (NDBI026) WS2015/16 RNDr. Michal Kopecký, Ph.D. Department of Software Engineering, Faculty of Mathematics and Physics, Charles University in Prague Views Creating views Using

More information

Programming in Oracle with PL/SQL. Procedural Language Extension to SQL

Programming in Oracle with PL/SQL. Procedural Language Extension to SQL Programming in Oracle with PL/SQL Procedural Language Extension to SQL PL/SQL Allows using general programming tools with SQL, for example: loops, conditions, functions, etc. This allows a lot more freedom

More information

PL/SQL is a combination of SQL along with the procedural features of programming languages.

PL/SQL is a combination of SQL along with the procedural features of programming languages. (24 Marks) 5.1 What is PLSQL? PLSQL stands for Procedural Language extension of SQL. PLSQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle

More information

Oracle PL/SQL. DUMmIES. by Michael Rosenblum and Dr. Paul Dorsey FOR

Oracle PL/SQL. DUMmIES. by Michael Rosenblum and Dr. Paul Dorsey FOR Oracle PL/SQL FOR DUMmIES by Michael Rosenblum and Dr. Paul Dorsey Oracle PL/SQL For Dummies Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright 2006 by

More information

Procedural Language Structured Query Language (PL/SQL)

Procedural Language Structured Query Language (PL/SQL) The Islamic University of Gaza Faculty of Engineering Dept. of Computer Engineering Database Lab (ECOM 4113) Lab 7 Procedural Language Structured Query Language (PL/SQL) Eng. Ibraheem Lubbad Structured

More information

Introduction to SQL/PLSQL Accelerated Ed 2

Introduction to SQL/PLSQL Accelerated Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Introduction to SQL/PLSQL Accelerated Ed 2 Duration: 5 Days What you will learn This Introduction to SQL/PLSQL Accelerated course

More information

Data Definition Language (DDL)

Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 6 Data Definition Language (DDL) Eng. Mohammed Alokshiya November 11, 2014 Database Keys A key

More information

Full file at

Full file at ch2 True/False Indicate whether the statement is true or false. 1. The SQL command to create a database table is an example of DML. 2. A user schema contains all database objects created by a user. 3.

More information

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL*Plus SQL*Plus is an application that recognizes & executes SQL commands &

More information

2. Programming written ( main theme is to test our data structure knowledge, proficiency

2. Programming written ( main theme is to test our data structure knowledge, proficiency ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

ORACLE Job Placement Paper. Paper Type : General - other

ORACLE Job Placement Paper. Paper Type : General - other ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time SQL Basics & PL-SQL Complete Practical & Real-time Training Sessions A Unit of SequelGate Innovative Technologies Pvt. Ltd. ISO Certified Training Institute Microsoft Certified Partner Training Highlights

More information

Oracle Exam 1z0-144 Oracle Database 11g: Program with PL/SQL Version: 8.5 [ Total Questions: 103 ]

Oracle Exam 1z0-144 Oracle Database 11g: Program with PL/SQL Version: 8.5 [ Total Questions: 103 ] s@lm@n Oracle Exam 1z0-144 Oracle Database 11g: Program with PL/SQL Version: 8.5 [ Total Questions: 103 ] Question No : 1 What is the correct definition of the persistent state of a packaged variable?

More information

Developer. 1 enterprise. Professional Guide. Oracle Advanced PL/SQL. example questions for 1Z0-146 examination

Developer. 1 enterprise. Professional Guide. Oracle Advanced PL/SQL. example questions for 1Z0-146 examination Oracle Advanced PL/SQL Developer Professional Guide Master advanced PL/SQL concepts along with plenty of example questions for 1Z0-146 examination Saurabh K. Gupta [ 1 enterprise I professional expertise

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

[Chapter 1] Oracle PL/SQL Language Pocket Reference

[Chapter 1] Oracle PL/SQL Language Pocket Reference Table of Contents 1. Oracle PL/SQL Language Pocket Reference...2 1.1 Introduction...2...3 1.2 Acknowledgments...3...4 1.3 Conventions...4...5 1.4 PL/SQL Language Fundamentals...5 1.4.1 The PL/SQL Character

More information

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration About PL/ Overview of PL/ PL/ is an extension to with design features of programming languages. Data manipulation and query statements of are included within procedural units of code. PL/ Environment Benefits

More information

EDUVITZ TECHNOLOGIES

EDUVITZ TECHNOLOGIES EDUVITZ TECHNOLOGIES Oracle Course Overview Oracle Training Course Prerequisites Computer Fundamentals, Windows Operating System Basic knowledge of database can be much more useful Oracle Training Course

More information

Oracle PLSQL. Course Summary. Duration. Objectives

Oracle PLSQL. Course Summary. Duration. Objectives Oracle PLSQL Course Summary Use conditional compilation to customize the functionality in a PL/SQL application without removing any source code Design PL/SQL packages to group related constructs Create

More information

Oracle PLSQL Study Material ORACLE & PL/SQL STUDY MATERIAL

Oracle PLSQL Study Material ORACLE & PL/SQL STUDY MATERIAL ORACLE & PL/SQL STUDY MATERIAL Table of Contents 1 OVERVIEW OF ORACLE... 5 1.1 THE DATABASE... 5 1.2 THE ORACLE INSTANCE... 8 2 BASIC ORACLE OBJECTS... 12 3 TRANSACTIONS IN ORACLE... 14 4 OVERVIEW OF PL/SQL...

More information

Oracle Database 11g & PL/SQL

Oracle Database 11g & PL/SQL Oracle Database 11g & PL/SQL 2 Day Developer's Guide Overview and Examples Marcelo Vinícius Cysneiros Aragão marcelovca90@inatel.br Topics 1. Topics 2. Connecting to Oracle Database and Exploring It 3.

More information

Appendix A Practices and Solutions

Appendix A Practices and Solutions Appendix A Practices and Solutions Table of Contents Practices for Lesson 1... 3 Practice 1-1: Introduction... 4 Practice Solutions 1-1: Introduction... 7 Practices for Lesson 2... 19 Practice 2-1: PLSQL

More information

SQL+PL/SQL. Introduction to SQL

SQL+PL/SQL. Introduction to SQL SQL+PL/SQL CURRICULUM Introduction to SQL Introduction to Oracle Database List the features of Oracle Database 12c Discuss the basic design, theoretical, and physical aspects of a relational database Categorize

More information

IBM Database Conversion Workbench 3.5

IBM Database Conversion Workbench 3.5 3.5 Oracle to IBM dashdb Conversion Guide Version: 3.5 Last Updated: June 12th, 2015 Table of Contents 1. Introduction... 4 2. Prerequisites... 5 3. Overview of the Conversion Process... 6 4. Set Up Your

More information

Migrating from Oracle to Postgres

Migrating from Oracle to Postgres Migrating from Oracle to Postgres For more information on how your organization can migrate existing applications to Postgres please contact EDB at sales@enterprisedb.com 2016 EnterpriseDB Corporation.

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

Oracle Database 10g: PL/SQL Fundamentals. Oracle Internal & Oracle Academy Use Only. Volume I Student Guide. D17112GC30 Edition 3.0 April 2009 D59413

Oracle Database 10g: PL/SQL Fundamentals. Oracle Internal & Oracle Academy Use Only. Volume I Student Guide. D17112GC30 Edition 3.0 April 2009 D59413 D17112GC30 Edition 3.0 April 2009 D59413 Oracle Database 10g: PL/SQL Fundamentals Volume I Student Guide Introduction Objectives After completing this lesson, you should be able to do the following: Describe

More information

Principles of Data Management

Principles of Data Management Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what

More information

Question Bank PL/SQL Fundamentals-I

Question Bank PL/SQL Fundamentals-I Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL

More information

Oracle. Exam Questions 1Z Oracle 11g: Advanced PL/SQL. Version:Demo. 1Z0-146 Exam Questions Demo https://www.passcertsure.

Oracle. Exam Questions 1Z Oracle 11g: Advanced PL/SQL. Version:Demo. 1Z0-146 Exam Questions Demo https://www.passcertsure. Oracle Exam Questions 1Z0-146 Oracle 11g: Advanced PL/SQL Version:Demo 1. Identify two strategies against SQL injection. (Choose two.) A. Using parameterized queries with bind arguments. B. Use subprograms

More information

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems ORACLE TRAINING CURRICULUM Relational Database Fundamentals Overview of Relational Database Concepts Relational Databases and Relational Database Management Systems Normalization Oracle Introduction to

More information

Oracle 1z z0-146 Oracle Database 11g: Advanced PL/SQL. Practice Test. Version QQ:

Oracle 1z z0-146 Oracle Database 11g: Advanced PL/SQL. Practice Test. Version QQ: Oracle 1z0-146 1z0-146 Oracle Database 11g: Advanced PL/SQL Practice Test Version 1.1 QUESTION NO: 1 Which two types of metadata can be retrieved by using the various procedures in the DBMS_METADATA PL/SQL

More information

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query Oracle SQL(Structured Query Language) Introduction of DBMS Approach to Data Management Introduction to prerequisites File and File system Disadvantages of file system Introduction to TOAD and oracle 11g/12c

More information

The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview.

The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview. Oracle Interview Procedure The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview. Written test paper consists of 30 questions. There is No Negative

More information

Course Outline and Objectives: Database Programming with SQL

Course Outline and Objectives: Database Programming with SQL Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,

More information

Question No : 1 Which statement is true about triggers on data definition language (DDL) statements?

Question No : 1 Which statement is true about triggers on data definition language (DDL) statements? Volume: 103 Questions Question No : 1 Which statement is true about triggers on data definition language (DDL) statements? A. They can be used to track changes only to a table or index. B. They can be

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL 2-2 Objectives This lesson covers the following objectives: List and define the different types of lexical units available in PL/SQL Describe identifiers and identify valid

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL 12-1 Objectives This lesson covers the following objectives: Recall the stages through which all SQL statements pass Describe the reasons for using dynamic SQL to create

More information

PL/SQL-TYCS. The 'Hello World' Example

PL/SQL-TYCS. The 'Hello World' Example PLSQL-TYCS In this chapter, we will discuss the Basic Syntax of PLSQL which is a block-structured language; this means that the PLSQL programs are divided and written in logical blocks of code. Each block

More information

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps:// IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://www.certqueen.com Exam : 1Z0-146 Title : Oracle database 11g:advanced pl/sql Version : Demo 1 / 9 1.The database instance was

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

M.SC(IT) I YEAR( ) CORE: ADVANCED DBMS-163B Semester : I Multiple Choice Questions

M.SC(IT) I YEAR( ) CORE: ADVANCED DBMS-163B Semester : I Multiple Choice Questions M.SC(IT) I YEAR(2017-2019) CORE: ADVANCED DBMS-163B Semester : I Multiple Choice Questions 1) storage lose contents when power is switched off. a) Volatile storage. b) Nonvolatile storage. c) Disk storage.

More information

Oracle TimesTen In-Memory Database

Oracle TimesTen In-Memory Database Oracle TimesTen In-Memory Database PL/SQL Developer's Guide 11g Release 2 (11.2.2) E21639-03 September 2012 Oracle TimesTen In-Memory Database PL/SQL Developer's Guide, 11g Release 2 (11.2.2) E21639-03

More information

PL/SQL Lab Exercises and Examples

PL/SQL Lab Exercises and Examples PLSQL Lab Exercises and Examples i Table of Contents PLSQL Overview... 1 Features of PLSQL... 1 Advantages of PLSQL... 2 Environment... 3 Step 1... 3 Step 2... 4 Step 3... 4 Step 4... 5 Step 5... 6 Step

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Proje D2K. CMM (Capability Maturity Model) level Project Standard:- Corporate Trainer s Profile

Proje D2K. CMM (Capability Maturity Model) level Project Standard:- Corporate Trainer s Profile D2K Corporate Trainer s Profile Corporate Trainers are having the experience of 4 to 12 years in development, working with TOP CMM level 5 comapnies (Project Leader /Project Manager ) qualified from NIT/IIT/IIM

More information

PL/SQL is one of three key programming languages embedded in the Oracle Database, along with SQL itself and Java.

PL/SQL is one of three key programming languages embedded in the Oracle Database, along with SQL itself and Java. About the Tutorial PLSQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle Corporation in the early 90's to enhance the capabilities of SQL.

More information

PL/SQL User s Guide and Reference

PL/SQL User s Guide and Reference PL/SQL User s Guide and Reference Release 2.2 March 1995 Part No. A19486 2 PL/SQL User s Guide and Reference, Release 2.2 Part No. A19486 2 Copyright Oracle Corporation 1988, 1995 All rights reserved.

More information