Spool Generated For Class of Oracle By Satish K Yellanki



Similar documents
GENERAL PROGRAMMING LANGUAGE FUNDAMENTALS

Recognizing PL/SQL Lexical Units. Copyright 2007, Oracle. All rights reserved.

3.GETTING STARTED WITH ORACLE8i

REPORT GENERATION USING SQL*PLUS COMMANDS

PL / SQL Basics. Chapter 3

Oracle Internal & Oracle Academy

CSC 443 Data Base Management Systems. Basic SQL

Using Variables in PL/SQL. Copyright 2007, Oracle. All rights reserved.

Programming with SQL

The Sins of SQL Programming that send the DB to Upgrade Purgatory Abel Macias. 1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

How To Create A Table In Sql (Ahem)

Oracle Data Redaction is Broken

Oracle For Beginners Page : 1

SQL Programming. CS145 Lecture Notes #10. Motivation. Oracle PL/SQL. Basics. Example schema:

JavaScript: Introduction to Scripting Pearson Education, Inc. All rights reserved.

CIS 631 Database Management Systems Sample Final Exam

Aggregating Data Using Group Functions

Building Queries in Microsoft Access 2007

Handling Exceptions. Copyright 2008, Oracle. All rights reserved.

Oracle10g PL/SQL Programming V1.0

Using SQL Server Management Studio

Answers to the Try It Yourself Sections

Writing Control Structures

Information and Computer Science Department ICS 324 Database Systems Lab#11 SQL-Basic Query

Chapter 1. Writing Basic. SQL Statements

SQL - QUICK GUIDE. Allows users to access data in relational database management systems.

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25)

Oracle Database 12c: Introduction to SQL Ed 1.1

In This Lecture. SQL Data Definition SQL SQL. Notes. Non-Procedural Programming. Database Systems Lecture 5 Natasha Alechina

Advanced SQL. Jim Mason. Web solutions for iseries engineer, build, deploy, support, train

MS ACCESS DATABASE DATA TYPES

Oracle Database: SQL and PL/SQL Fundamentals

Programming Database lectures for mathema

Oracle Database: SQL and PL/SQL Fundamentals

SQL Simple Queries. Chapter 3.1 V3.0. Napier University Dr Gordon Russell

Chapter 9, More SQL: Assertions, Views, and Programming Techniques

Oracle SQL. Course Summary. Duration. Objectives

A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

Chapter 8. SQL-99: SchemaDefinition, Constraints, and Queries and Views

2. Which of the following declarations is invalid? Mark for Review (1) Points

A basic create statement for a simple student table would look like the following.

PL/SQL MOCK TEST PL/SQL MOCK TEST I

Procedural Extension to SQL using Triggers. SS Chung

6. ARITHMETIC AND DATE FUNCTIONS

RDBMS Using Oracle. Lecture Week 7 Introduction to Oracle 9i SQL Last Lecture. kamran.munir@gmail.com. Joining Tables

Handling Exceptions. Copyright 2006, Oracle. All rights reserved. Oracle Database 10g: PL/SQL Fundamentals 8-1

Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.

Oracle Database: SQL and PL/SQL Fundamentals NEW

ISYS PL/SQL Basics. Week 03

Oracle PL/SQL Parameters, Variables, and Views

Hacking and Protecting Oracle DB. Slavik Markovich CTO, Sentrigo

1 Triggers. 2 PL/SQL Triggers

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Microsoft Access 3: Understanding and Creating Queries

Introduction to the Oracle DBMS

Information Systems SQL. Nikolaj Popov

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

More on SQL. Juliana Freire. Some slides adapted from J. Ullman, L. Delcambre, R. Ramakrishnan, G. Lindstrom and Silberschatz, Korth and Sudarshan

Excel: Introduction to Formulas

Porting from Oracle to PostgreSQL

How Strings are Stored. Searching Text. Setting. ANSI_PADDING Setting

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

constraint PKnbrVol primary key (No_vol) ); DROP TABLE segmentdevol CASCADE CONSTRAINTS; CREATE TABLE segmentdevol( numeric(9) NOT NULL,

STUDY OF PL/SQL BLOCK AIM: To Study about PL/SQL block.

Introduction to Oracle PL/SQL Programming V2.1 - Lessons 11-End

Webapps Vulnerability Report

GET DATA FROM MULTIPLE TABLES QUESTIONS

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

SQL Server Database Coding Standards and Guidelines

Number Representation

What is the value of SQL%ISOPEN immediately after the SELECT statement is executed? Error. That attribute does not apply for implicit cursors.

Exploiting PL/SQL Injection on Oracle 12c. with only. CREATE SESSION privileges

Producing Readable Output with SQL*Plus

Displaying Data from Multiple Tables. Chapter 4

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Training Guide. PL/SQL for Beginners. Workbook

14 Triggers / Embedded SQL

Visual Logic Instructions and Assignments

Boats bid bname color 101 Interlake blue 102 Interlake red 103 Clipper green 104 Marine red. Figure 1: Instances of Sailors, Boats and Reserves

MySQL Command Syntax

Continuous Integration Part 2

Database programming 20/08/2015. DBprog news. Outline. Motivation for DB programming. Using SQL queries in a program. Using SQL queries in a program

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

SQL/PSM. Outline. Database Application Development Oracle PL/SQL. Why Stored Procedures? Stored Procedures PL/SQL. Embedded SQL Dynamic SQL

SQL. Short introduction

SQL Injection in web applications

APEX_ITEM and Dynamic Tabular Forms

Query-by-Example (QBE)

Chapter 2: Elements of Java

Oracle SQL*PLUS (For , Fall 2006) Prepared by: Mr. Nkulu Nkasa

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems

Oracle TDE Tablespace Encryption

IT2304: Database Systems 1 (DBS 1)

Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff

Oracle Database 10g: Introduction to SQL

IT2305 Database Systems I (Compulsory)

Virtual Private Database Features in Oracle 10g.

Oracle For Beginners Page : 1

Transcription:

SQL> BEGIN 2. SQL> SELECT * FROM Dept; DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON SQL> BEGIN 2 DBMS_OUTPUT.PUT_LINE('First Message From PL/SQL'); 3 END; 4 / SQL> SET SERVEROUTPUT ON SQL> R 1 BEGIN 2 DBMS_OUTPUT.PUT_LINE('First Message From PL/SQL'); 3* END; First Message From PL/SQL SQL> SET SERVEROUTPUT OFF SQL> R 1 BEGIN 2 DBMS_OUTPUT.PUT_LINE('First Message From PL/SQL'); 3* END; SQL> SET SERVEROUTPUT ON SQL> R 1 BEGIN 2 DBMS_OUTPUT.PUT_LINE('First Message From PL/SQL'); 3* END; First Message From PL/SQL SQL> SELECT 'First Message From PL/SQL' SampleOutput FROM DUAL; SAMPLEOUTPUT ------------------------- First Message From PL/SQL SQL> SET SERVEROUTPUT OFF SQL> R

1* SELECT 'First Message From PL/SQL' SampleOutput FROM DUAL SAMPLEOUTPUT ------------------------- First Message From PL/SQL SQL> DECLARE 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) := 99; 4 V_Sample3 NUMBER(2) NOT NULL := 0; 5 V_Sample4 NUMBER(2) := 50; 8 DBMS_OUTPUT.PUT_LINE(V_Sample1); 9 DBMS_OUTPUT.PUT_LINE(V_Sample2); 10 DBMS_OUTPUT.PUT_LINE(V_Sample3); 11 DBMS_OUTPUT.PUT_LINE(V_Sample4); 12 DBMS_OUTPUT.PUT_LINE(V_Sample5); 13 END; 14 / SQL> SET SERVEROUTPUT ON SQL> R 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) := 99; 4 V_Sample3 NUMBER(2) NOT NULL := 0; 5 V_Sample4 NUMBER(2) := 50; 8 DBMS_OUTPUT.PUT_LINE(V_Sample1); 9 DBMS_OUTPUT.PUT_LINE(V_Sample2); 10 DBMS_OUTPUT.PUT_LINE(V_Sample3); 11 DBMS_OUTPUT.PUT_LINE(V_Sample4); 12 DBMS_OUTPUT.PUT_LINE(V_Sample5); 13* END; 99 0 50 25 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) := 99; 4 V_Sample3 NUMBER(2) NOT NULL := 0; 5 V_Sample4 NUMBER(2) := 50;

8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' V_Sample1); 9 DBMS_OUTPUT.PUT_LINE('The Value in Sample2 : ' V_Sample2); 10 DBMS_OUTPUT.PUT_LINE('The Value in Sample3 : ' V_Sample3); 11 DBMS_OUTPUT.PUT_LINE('The Value in Sample4 : ' V_Sample4); 12 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' V_Sample5); 13* END; The Value in Sample1 : The Value in Sample2 : 99 The Value in Sample3 : 0 The Value in Sample4 : 50 The Value in Sample5 : 25 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) := 99; 4 V_Sample3 NUMBER(2) NOT NULL := 0; 5 V_Sample4 NUMBER(2) := 50; 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1), 13* END; The Value in Sample1 : Not Assigned The Value in Sample2 : 99 The Value in Sample3 : 0 The Value in Sample4 : 50 The Value in Sample5 : 25 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) :=99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50;

8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1), 13* END; V_Sample3 NUMBER(2) NOT NULL; * ERROR at line 4: ORA-06550: line 4, column 11: PLS-00218: a variable declared NOT NULL must have an initialization assignment 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) :=99; 4 V_Sample3 NUMBER(2) NOT NULL := 0; 5 V_Sample4 NUMBER(2) := 50; 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1), 13 V_Sample2 := 55; 14 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample2), 15* END; V_Sample2 := 55; * ERROR at line 13: ORA-06550: line 13, column 1: PLS-00363: expression 'V_SAMPLE2' cannot be used as an assignment target ORA-06550: line 13, column 1: PL/SQL: Statement ignored

2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) :=99; 4 V_Sample3 NUMBER(2) NOT NULL := 0; 5 V_Sample4 NUMBER(2) := 50; 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1), 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample2), 14* END; The Value in Sample1 : Not Assigned The Value in Sample2 : 99 The Value in Sample3 : 0 The Value in Sample4 : 50 The Value in Sample5 : 25 The Value in Sample5 : 99 2 V_Sample1NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) = 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 11 DBMS_OUTPUT.PUT_LINE('The Value in Sample4 : NVL(TO_CHAR(V_Sample4), 'Not 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12),

14* END; ERROR: ORA-01756: quoted string not properly terminated 2 V_Sample1NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) = 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; V_Sample1NUMBER(2); * ERROR at line 2: ORA-06550: line 2, column 16: PLS-00103: Encountered the symbol "(" when expecting one of the constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestamp interval date binary national character nchar The symbol "<an identifier>" was substituted for "(" to continue. ORA-06550: line 3, column 30: PLS-00103: Encountered the symbol "=" when expecting one of the := ; not null default character The symbol ":= was inserted before "=" to continue. ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol "V_SAMPLE5" when expecting one of the * & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or!= or ~= >= <= <> and or like between multiset member SUBMULTISET_ Th ORA-06550: line 8, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> or!= or ~= >=

2 V_Sample1NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) = 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 11 DBMS_OUTPUT.PUT_LINE('The Value in Sample4 : NVL(TO_CHAR(V_Sample4), 'Not 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; ERROR: ORA-01756: quoted string not properly terminated 2 V_Sample1NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) = 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; V_Sample1NUMBER(2); * ERROR at line 2:

ORA-06550: line 2, column 16: PLS-00103: Encountered the symbol "(" when expecting one of the constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestamp interval date binary national character nchar The symbol "<an identifier>" was substituted for "(" to continue. ORA-06550: line 3, column 30: PLS-00103: Encountered the symbol "=" when expecting one of the := ; not null default character The symbol ":= was inserted before "=" to continue. ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol "V_SAMPLE5" when expecting one of the * & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or!= or ~= >= <= <> and or like between multiset member SUBMULTISET_ Th ORA-06550: line 8, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> or!= or ~= >= 2 V_Sample1NUMBERCONSTANT2); 3 V_Sample2 CONSTANT NUMBER(2) = 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; V_Sample1NUMBERCONSTANT2); * ERROR at line 2: ORA-06550: line 2, column 25: PLS-00103: Encountered the symbol ")" when expecting one of the constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestamp interval date binary national character

nchar ORA-06550: line 3, column 30: PLS-00103: Encountered the symbol "=" when expecting one of the := ; not null default character The symbol ":= was inserted before "=" to continue. ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol "V_SAMPLE5" when expecting one of the * & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or!= or ~= >= <= <> and or like between multiset member SUBMULTISET_ Th ORA-06550: line 8, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> or!= or ~= >= <= <> and or like as between from using member S ORA-06550: 2 V_Sample1NUMBERCONSTANT2CONSTANT; 3 V_Sample2 CONSTANT NUMBER(2) = 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; V_Sample1NUMBERCONSTANT2CONSTANT; * ERROR at line 2: ORA-06550: line 2, column 1: PLS-00114: identifier 'V_SAMPLE1NUMBERCONSTANT2CONSTA' too long ORA-06550: line 2, column 33: PLS-00103: Encountered the symbol ";" when expecting one of the constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestamp interval date binary national charac ORA-06550: line 3, column 30: PLS-00103: Encountered the symbol "=" when expecting one of the

:= ; not null default character The symbol ":= was inserted before "=" to continue. ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol "V_SAMPLE5" when expecting one of the * & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or!= or ~= >= <= <> and or like between multiset member SUBMULTISET_ Th ORA-06550: line 8, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> 2 V_Sample2 CONSTANT NUMBER(2) = 99; 3 V_Sample3 NUMBER(2) NOT NULL; 4 V_Sample4 NUMBER(2) := 50 5 V_Sample5 NUMBER(2) DEFAULT 25; 6 BEGIN 7 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample2 : ' NVL(TO_CHAR(V_Sample2), 'Not Assigned')) 9 DBMS_OUTPUT.PUT_LINE('The Value in Sample3 : ' NVL(TO_CHAR(V_Sample3), 10 DBMS_OUTPUT.PUT_LINE('The Value in Sample4 : ' NVL(TO_CHAR(V_Sample4), 11 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample5), 12 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 13* END; V_Sample2 CONSTANT NUMBER(2) = 99; * ERROR at line 2: ORA-06550: line 2, column 30: PLS-00103: Encountered the symbol "=" when expecting one of the := ; not null default character The symbol ":= was inserted before "=" to continue. ORA-06550: line 5, column 1: PLS-00103: Encountered the symbol "V_SAMPLE5" when expecting one of the * & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or!= or ~= >= <= <> and or like between multiset member SUBMULTISET_ Th ORA-06550: line 7, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> or!= or ~= >= <= <> and or like as

between from using member S ORA-06550: line 9, column 1: PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting one of the :=. ( % ; The symbol ":=" was substituted for "DBMS_OUTPUT" to continue. 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) = 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; V_Sample2 CONSTANT NUMBER(2) = 99; * ERROR at line 3: ORA-06550: line 3, column 30: PLS-00103: Encountered the symbol "=" when expecting one of the := ; not null default character The symbol ":= was inserted before "=" to continue. ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol "V_SAMPLE5" when expecting one of the * & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or!= or ~= >= <= <> and or like between multiset member SUBMULTISET_ Th ORA-06550: line 8, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> or!= or ~= >= <= <> and or like as between from using member S ORA-06550: line 10, column 1: PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting one of the :=. ( % ; The symbol ":=" was substituted for "DBMS_OUTPUT" to continue.

2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) := 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50 8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; V_Sample5 NUMBER(2) DEFAULT 25; * ERROR at line 6: ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol "V_SAMPLE5" when expecting one of the * & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or!= or ~= >= <= <> and or like between multiset member SUBMULTISET_ The symbol ";" was substituted for "V_SAMPLE5" to continue. ORA-06550: line 8, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> or!= or ~= >= <= <> and or like as between from using member S ORA-06550: line 10, column 1: PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting one of the :=. ( % ; The symbol ":=" was substituted for "DBMS_OUTPUT" to continue. 2 V_Sample1 NUMBER(2); 3 V_Sample2 CONSTANT NUMBER(2) := 99; 4 V_Sample3 NUMBER(2) NOT NULL; 5 V_Sample4 NUMBER(2) := 50;

8 DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not 'Not Assigned')) 13 DBMS_OUTPUT.PUT_LINE('The Value in Sample5 : ' NVL(TO_CHAR(V_Sample12), 14* END; DBMS_OUTPUT.PUT_LINE('The Value in Sample1 : ' NVL(TO_CHAR(V_Sample1, 'Not * ERROR at line 8: ORA-06550: line 8, column 88: PLS-00103: Encountered the symbol ";" when expecting one of the. ( ), * % & = - + < / > at in is mod remainder not rem =>.. <an exponent (**)> <> or!= or ~= >= <= <> and or like as between from using member SUBMULTISET_ The symbol ")" was substituted for ";" to continue. ORA-06550: line 10, column 1: PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting one of the :=. ( % ; The symbol ":=" was substituted for "DBMS_OUTPUT" to continue. SQL> BEGIN 2 DBMS_OUTPUT.PUT_LINE('Text With Out Quotes'); 3 --DBMS_OUTPUT.PUT_LINE('''Text With in Quotes'''); 4 --DBMS_OUTPUT.PUT_LINE('''Text'' ''With'' ''in'' ''Quotes'''); 5 --DBMS_OUTPUT.PUT_LINE(Q'!'Text With in Quotes'!'); 6 --DBMS_OUTPUT.PUT_LINE(Q'!'Text' 'With' 'in' 'Quotes'!'); 7 END; 8 / Text With Out Quotes 1 BEGIN 2 DBMS_OUTPUT.PUT_LINE('Text With Out Quotes'); 3 DBMS_OUTPUT.PUT_LINE('''Text With in Quotes'''); 4 --DBMS_OUTPUT.PUT_LINE('''Text'' ''With'' ''in'' ''Quotes'''); 5 --DBMS_OUTPUT.PUT_LINE(Q'!'Text With in Quotes'!');

6 --DBMS_OUTPUT.PUT_LINE(Q'!'Text' 'With' 'in' 'Quotes'!'); 7* END; Text With Out Quotes 'Text With in Quotes' 1 BEGIN 2 DBMS_OUTPUT.PUT_LINE('Text With Out Quotes'); 3 DBMS_OUTPUT.PUT_LINE('''Text With in Quotes'''); 4 DBMS_OUTPUT.PUT_LINE('''Text'' ''With'' ''in'' ''Quotes'''); 5 --DBMS_OUTPUT.PUT_LINE(Q'!'Text With in Quotes'!'); 6 --DBMS_OUTPUT.PUT_LINE(Q'!'Text' 'With' 'in' 'Quotes'!'); 7* END; Text With Out Quotes 'Text With in Quotes' 'Text' 'With' 'in' 'Quotes' SQL> BEGIN 2 DBMS_OUTPUT.PUT_LINE('Text With Out Quotes'); 3 DBMS_OUTPUT.PUT_LINE('''Text With in Quotes'''); 4 DBMS_OUTPUT.PUT_LINE('''Text'' ''With'' ''in'' ''Quotes'''); 5 DBMS_OUTPUT.PUT_LINE(Q'!'Text With in Quotes'!'); 6 DBMS_OUTPUT.PUT_LINE(Q'!'Text' 'With' 'in' 'Quotes'!'); 7 END; 8 / Text With Out Quotes 'Text With in Quotes' 'Text' 'With' 'in' 'Quotes' 'Text With in Quotes' 'Text' 'With' 'in' 'Quotes' 2 String1 VARCHAR2(30) := 'Oracle'; 3 String2 VARCHAR2(30) := 'Corporation'; 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('Your First String is : ' String1); 6 DBMS_OUTPUT.PUT_LINE('Your Second String is : ' String2); 7 DBMS_OUTPUT.PUT_LINE('Your Final String is : ' String1 String2); 8* END; Your First String is : Oracle

Your Second String is : Corporation Your Final String is : OracleCorporation 2 String1 VARCHAR2(30) := 'Oracle'; 3 String2 VARCHAR2(30) := 'Corporation'; 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('Your First String is : ' String1); 6 DBMS_OUTPUT.PUT_LINE('Your Second String is : ' String2); 7 DBMS_OUTPUT.PUT_LINE('Your Final String is : ' CONCAT(String1, CONCAT(' ', String2))); 8* END; Your First String is : Oracle Your Second String is : Corporation Your Final String is : Oracle Corporation 2 MyNumber1 NUMBER := 10; 3 MyNumber2 NUMBER := 20; 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('Your First Number is : ' MyNumber1); 6 DBMS_OUTPUT.PUT_LINE('Your Second Number is : ' MyNumber2); 7 DBMS_OUTPUT.PUT_LINE('The Sum of ' MyNumber1 ' and ' MyNumber2 ' is : ' TO_CHAR(MyNumber1 + MyNumber2, '999D99')); 8* END; Your First Number is : 10 Your Second Number is : 20 The Sum of 10 and 20 is : 30.00 2 MyNumber1 NUMBER := 10; 3 MyNumber2 NUMBER := 20; 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('Your First Number is : ' TO_CHAR(TO_DATE(MyNumber1, 'J'), 'JSP'));

6 DBMS_OUTPUT.PUT_LINE('Your Second Number is : ' TO_CHAR(TO_DATE(MyNumber2, 'J'), 'JSP')); 7 DBMS_OUTPUT.PUT_LINE('The Sum of ' TO_CHAR(TO_DATE(MyNumber1, 'J'), 'JSP') ' and ' TO_CHAR(TO_DATE(MyNumber2, 'J'), 'JSP') ' is : ' TO_CHAR(TO_DATE(MyNumber1 + MyNumber2, 'J'), 'JSP')); 8* END; Your First Number is : TEN Your Second Number is : TWENTY The Sum of TEN and TWENTY is : THIRTY SQL> DECLARE 2 String1 VARCHAR2(30) := '&String1'; 3 String2 VARCHAR2(30) := '&String2'; 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('Your First String is : ' String1); 6 DBMS_OUTPUT.PUT_LINE('Your Second String is : ' String2); 7 DBMS_OUTPUT.PUT_LINE('Your Final String is : ' String1 String2); 8 END; 9 / Enter value for string1: Oracle Enter value for string2: Corporation Your First String is : Oracle Your Second String is : Corporation Your Final String is : OracleCorporation 2 String1 VARCHAR2(30); 3 String2 VARCHAR2(30); 4 BEGIN 5 String1 := '&String1'; 6 DBMS_OUTPUT.PUT_LINE('Your First String is : ' String1); 7 String2 := '&String2'; 8 DBMS_OUTPUT.PUT_LINE('Your Second String is : ' String2); 9 DBMS_OUTPUT.PUT_LINE('Your Final String is : ' String1 String2); 10* END; Enter value for string1: Oracle Enter value for string2: Corporation Your First String is : Oracle Your Second String is : Corporation Your Final String is : OracleCorporation

2 MyNumber1 NUMBER := &Number1; 3 MyNumber2 NUMBER := &Number2; 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('Your First Number is : ' TO_CHAR(TO_DATE(MyNumber1, 'J'), 'JSP')); 6 DBMS_OUTPUT.PUT_LINE('Your Second Number is : ' TO_CHAR(TO_DATE(MyNumber2, 'J'), 'JSP')); 7 DBMS_OUTPUT.PUT_LINE('The Sum of ' TO_CHAR(TO_DATE(MyNumber1, 'J'), 'JSP') ' and ' TO_CHAR(TO_DATE(MyNumber2, 'J'), 'JSP') ' is : ' TO_CHAR(TO_DATE(MyNumber1 + MyNumber2, 'J'), 'JSP')); 8* END; Enter value for number1: 25 Enter value for number2: 45 Your First Number is : TWENTY-FIVE Your Second Number is : FORTY-FIVE The Sum of TWENTY-FIVE and FORTY-FIVE is : SEVENTY 2 V_FirstName VARCHAR2(30) := '&FName'; 3 V_MiddleName VARCHAR2(30) := '&MName'; 4 V_LastName VARCHAR2(30) := '&LName'; 5 V_DOB DATE := '&DateOfBirth'; 6 BEGIN 7 DBMS_OUTPUT.PUT_LINE('Your First Name is : ' V_FirstName); 8 DBMS_OUTPUT.PUT_LINE('Your Middle Name is : ' V_MiddleName); 9 DBMS_OUTPUT.PUT_LINE('Your Last Name is : ' V_LastName); 10 DBMS_OUTPUT.PUT_LINE('******Concatenating******'); 11 DBMS_OUTPUT.PUT_LINE('Your Full Name is : ' V_FirstName ' ' V_MiddleName ' ' V_LastName); 12 DBMS_OUTPUT.PUT_LINE('Your Date of Birth is : ' V_DOB); 13 DBMS_OUTPUT.PUT_LINE('Your Were Born on : ' TO_CHAR(V_DOB, 'Day')); 14 DBMS_OUTPUT.PUT_LINE('Your Present Age is : ' TRUNC((SYSDATE- V_DOB)/365)); 15* END; Enter value for fname: Sample Enter value for mname: Simple Enter value for lname: Text Enter value for dateofbirth: 12-JAN-96 Your First Name is : Sample Your Middle Name is : Simple Your Last Name is : Text ******Concatenating****** Your Full Name is : Sample Simple Text

Your Date of Birth is : 12-JAN-96 Your Were Born on : Friday Your Present Age is : 6 2 V_FirstName VARCHAR2(30) := '&FName'; 3 V_MiddleName VARCHAR2(30) := '&MName'; 4 V_LastName VARCHAR2(30) := '&LName'; 5 V_DOB DATE := '&DateOfBirth'; 6 BEGIN 7 DBMS_OUTPUT.PUT_LINE('Your First Name is : ' V_FirstName); 8 DBMS_OUTPUT.PUT_LINE('Your Middle Name is : ' V_MiddleName); 9 DBMS_OUTPUT.PUT_LINE('Your Last Name is : ' V_LastName); 10 DBMS_OUTPUT.PUT_LINE('******Concatenating******'); 11 DBMS_OUTPUT.PUT_LINE('Your Full Name is : ' V_FirstName ' ' V_MiddleName ' ' V_LastName); 12 DBMS_OUTPUT.PUT_LINE('Your Date of Birth is : ' V_DOB); 13 DBMS_OUTPUT.PUT_LINE('Your Were Born on : ' TO_CHAR(V_DOB, 'Day')); 14 DBMS_OUTPUT.PUT_LINE('Your Present Age is : ' TRUNC(MONTHS_BETWEEN(SYSDATE, V_DOB)/12)); 15* END; Enter value for fname: Sample Enter value for mname: Simple Enter value for lname: Text Enter value for dateofbirth: 12-MAR-86 Your First Name is : Sample Your Middle Name is : Simple Your Last Name is : Text ******Concatenating****** Your Full Name is : Sample Simple Text Your Date of Birth is : 12-MAR-86 Your Were Born on : Wednesday Your Present Age is : 16 SQL> DECLARE 2 BEGIN 3 NULL; 4 DECLARE 5 BEGIN 6 NULL; 7 EXCEPTION 8 WHEN OTHERS THEN 9 NULL; 10 END; 11 EXCEPTION 12 WHEN OTHERS THEN

13 NULL; 14 END; 15 / SQL> DECLARE 2 BEGIN 3 NULL; 4 DECLARE 5 BEGIN 6 NULL; 7 DECLARE 8 BEGIN 9 NULL; 10 EXCEPTION 11 WHEN OTHERS THEN 12 NULL; 13 END; 14 DECLARE 15 BEGIN 16 NULL; 17 EXCEPTION 18 WHEN OTHERS THEN 19 NULL; 20 END; 21 EXCEPTION 22 WHEN OTHERS THEN 23 NULL; 24 END; 25 EXCEPTION 26 WHEN OTHERS THEN 27 NULL; 28 END; 29 / 2 BEGIN 3 NULL; 4 DECLARE 5 BEGIN 6 NULL; 7 DECLARE 8 BEGIN 9 NULL; 10 EXCEPTION 11 WHEN OTHERS THEN 12 NULL; 13 END; 14 DECLARE 15 BEGIN

16 NULL; 17 EXCEPTION 18 WHEN OTHERS THEN 19 DECLARE 20 BEGIN 21 NULL; 22 EXCEPTION 23 WHEN OTHERS THEN 24 NULL; 25 END; 26 NULL; 27 END; 28 EXCEPTION 29 WHEN OTHERS THEN 30 NULL; 31 END; 32 EXCEPTION 33 WHEN OTHERS THEN 34 NULL; 35* END; SQL> DECLARE 2 BEGIN 3 NULL; 4 DECLARE 5 BEGIN 6 NULL; 7 DECLARE 8 BEGIN 9 NULL; 10 EXCEPTION 11 WHEN OTHERS THEN 12 NULL; 13 END; 14 DECLARE 15 BEGIN 16 NULL; 17 EXCEPTION 18 WHEN OTHERS THEN 19 DECLARE 20 BEGIN 21 NULL; 22 EXCEPTION 23 WHEN OTHERS THEN 24 NULL; 25 END; 26 NULL; 27 END; 28 EXCEPTION 29 WHEN OTHERS THEN 30 NULL;

31 END; 32 EXCEPTION 33 WHEN OTHERS THEN 34 DECLARE 35 BEGIN 36 NULL; 37 DECLARE 38 BEGIN 39 NULL; 40 EXCEPTION 41 WHEN OTHERS THEN 42 NULL; 43 END; 44 DECLARE 45 BEGIN 46 NULL; 47 EXCEPTION 48 WHEN OTHERS THEN 49 DECLARE 50 BEGIN 51 NULL; 52 EXCEPTION 53 WHEN OTHERS THEN 54 NULL; 55 END; 56 NULL; 57 END; 58 EXCEPTION 59 WHEN OTHERS THEN 60 NULL; 61 END; 62 NULL; 63 END; 64 / SQL> SPOOL OFF