Pl/SQL LANGUAGE MULITPLE CHOICE QUESTION SET-3

Slides:



Advertisements
Similar presentations
PL/SQL.
Advertisements

Chapter 8 Advanced SQL Pearson Education © Chapter 8 - Objectives u How to use the SQL programming language u How to use SQL cursors u How to create.
BD05/06 PL/SQL  Introduction  Structure of a block  Variables and types  Accessing the database  Control flow  Cursors  Exceptions  Procedures.
AN INTRODUCTION TO PL/SQL Mehdi Azarmi 1. Introduction PL/SQL is Oracle's procedural language extension to SQL, the non-procedural relational database.
PL/SQL. Introduction to PL/SQL PL/SQL is the procedure extension to Oracle SQL. It is used to access an Oracle database from various environments (e.g.
SQL*PLUS, PLSQL and SQLLDR Ali Obaidi. SQL Advantages High level – Builds on relational algebra and calculus – Powerful operations – Enables automatic.
PL/SQL (Procedural Language extensions to SQL) Prepared by: Manoj Kathpalia Edited by: M V Ramakrishna.
Chapter 4B: More Advanced PL/SQL Programming
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
A Guide to SQL, Seventh Edition. Objectives Embed SQL commands in PL/SQL programs Retrieve single rows using embedded SQL Update a table using embedded.
Introduction to PL/SQL
Bordoloi and Bock PROCEDURES, FUNCTIONS & TRIGGERS.
SQL Within PL / SQL Chapter 4. 2 SQL Within PL / SQL SQL Statements DML in PL / SQL Pseudocolums Transaction Control.
Bordoloi and Bock CURSORS. Bordoloi and Bock CURSOR MANIPULATION To process an SQL statement, ORACLE needs to create an area of memory known as the context.
PL / SQL P rocedural L anguage / S tructured Q uery L anguage Chapter 7 in Lab Reference.
SQL Training Procedures & Functions. Confidential & Proprietary Copyright © 2009 Cardinal Directions, Inc. DB Procedures & Functions Procedures and Functions.
1 Introduction to PL/SQL. 2  Procedural programming language  Uses detailed instructions  Processes statements sequentially  Combines SQL commands.
Oracle10g Developer: PL/SQL Programming1 Objectives Manipulating data with cursors Managing errors with exception handlers Addressing exception-handling.
Lecture 4 PL/SQL language. PL/SQL – procedural SQL Allows combining procedural and SQL code PL/SQL code is compiled, including SQL commands PL/SQL code.
Overview · What is PL/SQL · Advantages of PL/SQL · Basic Structure of a PL/SQL Block · Procedure · Function · Anonymous Block · Types of Block · Declaring.
CS178 Database Management PL/SQL session 8 References: ORACLE 9i PROGRAMMING A Primer Rajshekhar Sunderraman.
PL / SQL By Mohammed Baihan. What is PL/SQL? PL/SQL stands for Procedural Language extension of SQL. PL/SQL is a combination of SQL along with the procedural.
Oracle PL/SQL. PL/SQL Originally modeled after ADA Originally modeled after ADA Created for Dept. of DefenseCreated for Dept. of Defense Allows expanded.
CIS4368: Advanced DatabaseSlide # 1 PL/SQL Dr. Peeter KirsSpring, 2003 PL/SQL.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 8 Advanced SQL.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
PL/SQL Block Structure DECLARE - Optional Variables, cursors, user-defined exceptions BEGIN - Mandatory SQL Statements PL/SQL Statements EXCEPTIONS - Optional.
Trigger Oracle PL/SQL. Triggers Associated with a particular table Associated with a particular table Automatically executed when a particular event occurs.
Chapter 15 Introduction to PL/SQL. Chapter Objectives  Explain the benefits of using PL/SQL blocks versus several SQL statements  Identify the sections.
Guide to Oracle 10g ITBIS373 Database Development Lecture 4a - Chapter 4: Using SQL Queries to Insert, Update, Delete, and View Data.
Database Technology Jing Shen.
School of Computing and Management Sciences © Sheffield Hallam University SQL is non-procedural –designed to be relatively approachable to non- programmers.
1 PL\SQL Dev Templates. 2 TEMPLATE DEFINITION Whenever you create a new program unit, its initial contents are based upon a template which contains pre-defined.
What is a Package? A package is an Oracle object, which holds other objects within it. Objects commonly held within a package are procedures, functions,
Using SQL in PL/SQL ITEC 224 Database Programming.
ITEC 224 Database Programming PL/SQL Lab Cursors.
Chapter 16 Cursors and Exceptions. Chapter Objectives  Determine when an explicit cursor is required  Declare, open, and close an explicit cursor 
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
implicit and an explicit cursor
Using SQL in PL/SQL Oracle Database PL/SQL 10g Programming Chapter 4.
A procedure is a module performing one or more actions; it does not need to return any values. The syntax for creating a procedure is as follows: CREATE.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Program with PL/SQL Lesson 3. Interacting with the Oracle Server.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Overview.
SQL Triggers, Functions & Stored Procedures Programming Operations.
CS422 Principles of Database Systems Oracle PL/SQL Chengyu Sun California State University, Los Angeles.
CS422 Principles of Database Systems Stored Procedures and Triggers Chengyu Sun California State University, Los Angeles.
1 Copyright © 2004, Oracle. All rights reserved. PL/SQL Programming Concepts: Review.
C LANGUAGE MULITPLE CHOICE QUESTION SET-2
ITEC 224 Database Programming
CS322: Database Systems PL/ SQL PL/SQL by Ivan Bayross.
A Guide to SQL, Seventh Edition
DataBase Logic in Business Applications
PL/SQL MULTIPLE CHOICE QUESTION.
Interacting with the Oracle Server
PL/SQL.
SQL Stored Triggers Presented by: Dr. Samir Tartir
Introduction to Triggers
PL/SQL MULTIPLE CHOICE QUESTION.
Oracle11g: PL/SQL Programming Chapter 4 Cursors and Exception Handling.
Cursors ITEC 224 Database Programming PL/SQL Lab.
Database Management Systems 2
Agenda Summary of last class Cursors Loops Records Simple Loops
PL/SQL Scripting in Oracle:
Chapter 4: Introduction to PL/SQL
Chapter 2 Handling Data in PL/SQL Blocks Oracle9i Developer:
Unit I-2.
Chapter 8 Advanced SQL.
PL/SQL Declaring Variables.
Presentation transcript:

Pl/SQL LANGUAGE MULITPLE CHOICE QUESTION SET-3

1. PL/SQL stands for --------. Procedural language Procedural Language extension of SQL Programming language extension of SQL None of these www.prolearninghub.com

2. The declaration section of PL/SQL block is start with reserved keyword -------. DECLARE NEW CLASS BLOCK www.prolearninghub.com

3. DDL stands for ------. Data decomposition language Data definition language Data declaration language Domain definition language www.prolearninghub.com

4. Which of the following statement is correct about PL/SQL. It consists block of codes consists of procedural language constructs PL/SQL handles errors or exceptions effectively All are true www.prolearninghub.com

5. We can declare data type of a field ----- n the same way as you declare the fields while creating the table col_name table_name.column_name%type; We can use both A and B None of these www.prolearninghub.com

6. ------ is a SYSTEM.EFFECTIVE.DATE variable. Read only Write only Both read and write only None of the mentioned www.prolearninghub.com

7. The IN operator tests ---------. whether a value lies in a specified range set membership compares a character, string, or CLOB None of these www.prolearninghub.com

8. PL/SQL loop can be labeled by ------ Single angle brackets Double angle brackets Curly brackets Round brackets www.prolearninghub.com

9. What command can we type to call a report from FORM. Run_Product built_in Call_Product_Default Run_Product_Default None of these www.prolearninghub.com

Collection of system libraries 10. A subprogram is a -----. Few lines program A child of a program Collection of system libraries None of these www.prolearninghub.com

11. It you want to restrict a procedure you’ll use ------property. GET_BLOCK RESTRICT_BLOCK STOP_BLOCK END_BLOCK www.prolearninghub.com

12. A library file is save with ----- extension. .pl .sql .plsql .pll www.prolearninghub.com

13. ASCII(x); function returns --------. Character with the ASCII value of x ASCII value of the character x Convert the ASCII character into binary Converts the binary character into ASCII www.prolearninghub.com

14. INITCAP(x); function --------. Convert the initial letter of string to upper case and return true Convert the initial letter of each word to upper case and return true Convert the initial letter of each word to upper case and return string Convert the initial letter of each word to upper case and return array www.prolearninghub.com

15. INSTR() find a string and return its position and has ----- number of parameters. 2 3 4 5 www.prolearninghub.com

16. INSTRB(x); return the location of string in ------. Binary Boolean Bytes None of these www.prolearninghub.com

17. TO find the number of character in a string ------function will be helpful. LENGTHB(); LENGTH(); SIZE(); STRCHAR(); www.prolearninghub.com

18. PL/SQL programming language provides a data structure called the ------. ARRAY VARRAY STACK POINTER www.prolearninghub.com

19. The basic syntax for creating a varray is --------. CREATE TYPE varray_type_name IS VARRAY(n) of <element_type > REPLACE TYPE varray_type_name IS VARRAY(n) of <element_type > CREATE OR REPLACE TYPE varray_type_name IS VARRAY(n) of <element_type > CREATE OR REPLACE TYPE varray_type_name IS VARRAY(n) www.prolearninghub.com

20. A subprogram created inside a package is -------. packaged subprogram standalone subprogram Procedure Function www.prolearninghub.com

21. ------ keyword is used to create a standalone procedure. IN Can be anyone of them www.prolearninghub.com

22. Standalone procedure can be called -------. Using the execute keyword Calling the name of the procedure from a PL/SQL block Using the run keyword Both A and B www.prolearninghub.com

23. The OUT parameter in a subprogram is passed by -------. Value Reference Object None of these www.prolearninghub.com

24. Actual parameters could be passed by -----. Positional notation Named notation Mixed notation All of these www.prolearninghub.com

Object passing notation 25. the following declaration represent which notation of parameter passing. findMin(x=>a, y=>b, z=>c, m=>d); Positional notation Named notation Mixed notation Object passing notation www.prolearninghub.com

26. Which of the following call is illegal. findMin(a, b, c, m=>d); findMin(x=>a, b, c, d); findMin(a, b, c, d); All are legal www.prolearninghub.com

27. Oracle creates a memory area, known as ------, for processing an SQL statement Execution area Block area Code area Context area www.prolearninghub.com

28. A ------ is a pointer to context area. Cursor Array Memory Block www.prolearninghub.com

29. A cursor that is automatically created by Oracle whenever an SQL statement is executed is called as -------. Implicit cursor Explicit cursor Random cursor Allocated cursor www.prolearninghub.com

30. %FOUND attribute of a cursor returns ------. Returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows Return true if a SELECT INTO statement returned one or more rows Both A and B Always return FALSE www.prolearninghub.com

Always return true because ORACLE never close sql cursor 31. %ISOPEN -------- Always returns false Always return true because ORACLE never close sql cursor Open implicit cursor Both A and B www.prolearninghub.com

32. The syntax for creating an explicit cursor is ---------. CURSOR cursor_name IS select_statement; CURSOR cursor_name IS update_statement; cursor_name IS select_statement; CURSOR cursor_name select_statement; www.prolearninghub.com

33. Write the query for fetching the cursor involving access one row at a time. SEELCT x_customers INTO x_id, x_name, x_address; FETCH x_customers , x_id, x_name, x_address; FETCH x_customers INTO x_id, x_name, x_address; None of the these is correct www.prolearninghub.com

34. PL/SQL can handle the ------ records. Table-based Cursor based User defined All of these www.prolearninghub.com

35. The %ROWTYPE attribute creates the -------. Table based records Cursor based records User defined records Both A and B www.prolearninghub.com

36. How many types of exception are there in PL/SQL. 2 3 4 5 www.prolearninghub.com

37. RAISE command is used to -------. Handle a exception Create an exception To remove a exception To do all of above www.prolearninghub.com

38. Syntax for defining a exception is ------. DECLARE my-exception; DECLARE my-exception EXCEPTION; DECLARE user-Defined EXCEPTION; None of these www.prolearninghub.com

39. ACCESS_INTO_NULL generates ------ oracle error. 06592 06531 00001 06530 www.prolearninghub.com

40. INVALID_NUMBER exception raised when ---------.  attempts are made to make a cursor operation that is not allowed the conversion of a character string into a number fails  when s program attempts to log on to the database with an invalid username It is raised when a SELECT INTO statement returns no rows www.prolearninghub.com

41. What exception raised when a database call is issued without being connected to the database. NOT_LOGGED_ON LOGIN_DENIED NO_DATA_FOUND PROGRAM_ERROR www.prolearninghub.com

42. What exception occurs when PL/SQL ran out of memory or memory was corrupted. STORAGE_ERROR LOW_MEMORY RUNOUT_MEMORY CORRUPT_MEMORY www.prolearninghub.com

43. What oracle error TOO_MANY_ROWS generates . 06500 06502 30625 01422 www.prolearninghub.com

44. -------- are stored programs, which are automatically executed or fired when some events occur. Cursors Triggers Procedures Packages www.prolearninghub.com

45. Identify the false statement about triggers. They Enforce referential integrity Generating some derived column values automatically Allows invalid transactions also Synchronous replication of tables www.prolearninghub.com

46. A package consist of ----- Package specification Package body Package declaration Both A and B www.prolearninghub.com

47. A ------ is an ordered group of elements having the same data type. Package Library procedure Collection www.prolearninghub.com

48. PL/SQL provide ------ type of collection. 2 3 4 5 www.prolearninghub.com

49. An ---------- (also called an associative array) is a set of key-value pairs. Nested table Index-by tables Variable size array varray www.prolearninghub.com

50. Syntax for nested table is -----. TYPE type_name IS TABLE OF element_type [NOT NULL]; table_name type_name; TYPE type_name IS TABLE OF element_type [NOT NULL]; TYPE type_name IS TABLE OF element_type [NOT NULL]; None of these www.prolearninghub.com