0% found this document useful (0 votes)
18 views

PLSQL

Uploaded by

Hussain Akhil
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

PLSQL

Uploaded by

Hussain Akhil
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Oracle SOL developer is an

1.Oracle database instance


2.Oracle database management system
3.Oracle Listener
4.oracle client

What are the various types of parameter modes in a procedure ? CHOOSE

1.In
2.Outin
3.Out
4.Inout

What is the use of an index?

1.Retrieve data more quickly and efficiently


2.Related data requires much less 1/0 overhead if accessed simultaneously
3.Simplify the user's perception of data access
4.All of the Mentioned
5.none

Which of the following is NOT VALID is PL/SOL

1.Bool boolean:
2.NUM1. NUM2 number;
3.deptname dept.dname%type;
4.date1 date = sysdate
5.none of the above

Which of the following is true about scalar data types in PL/SOL?

1.They hold single values with no internal components


2.Examples of scalar data types are NUMBER, DATE, or BOOLEAN.
3.PUSOL provides subtypes of data types
4.All are true

Which one of the following statements about formal and actual parameters is true?

1.Formal and Actual parameters have the same name


2.Formal and Actual parameters have the different name
3.A formal parameter is declared within the called procedure, while an actual parameter is declared in the caling
environment
4.An actual parameter is declared within the called procedure
5.none of these

Which of the following is not true about PL/SQL loop structures?

1.In the basic loop structure, sequence of statements is enclosed between the LOOP and END LOOP statements.
2.The WHILE loop repeats a statement or group of statements while a given condition is true.
3.The FOR loop executes a sequence of statements multiple times and abbreviates the code that manages the loop
variable.
4.Nesting of loops is not allowed
Which of the following is an Oracle DDL function?

1.DECODE
2.DROP
3.TO_CHAR
4.NVL
5.all of these are Oracle DDL functions

cursor are declared by ORACLE for each UPDATE, DELETE and INSERT SQL commands.

1.Implicit
2.Explicit
3.Internal
4.External

Which of the following is not true about the PL/SOL functions?

1.A PL/SQL function is same as a procedure except that it returns a value.


2.The function body must contain a RETURN statement.
3.The RETURN clause does not specify the data type of the return value.
4.The AS keyword is used instead of the IS keyword,for creating a standalone function.

____is a procedural extension of Oracle-SQL that offers language constructs similar to those in imperative programming
languages

1.SQL
2.PL/SQL
3.Advanced SQL
4.PQL

List the correct sequence of commands to process a set of records when using explicit cursors

1.INITIALIZE, GET, CLOSE


2.CURSOR, GET, FETCH, CLOSE
3.OPEN, FETCH, CLOSE
4.CURSOR, FETCH, CLOSE
5.GET, SEEK, HIDE

Enter the missing keyword If foo = 1 THEN I_text:= 'A' ____foo=2 THEN I_text:='B'; 'ELSE I_text := 'C';END IF;

1.ELSE
2.ELSE IF
3.ELFI
4.ELSIF
5.none of the above

In PL/SQL ____errors can arise from design faults, coding mistakes, hardware failures, and many other sources

1.System error
2.syntax error
3.run-time
4.Specific error
5.logic error
Functions for error trapping are contained in which section of a PL/SQL block?

1. Header
2.Declarative
3.Executable
4.Exception

Supply the missing key word IF foo IS NULL___


NULL;END IF;

1.DO
2.EXECUTE
3.THEN
4.ELSE

The user defined data type can be created using

1.create datatype
2.create data
3.create definetype
4.create type
5.create userdata

Which of the following is not true about PL/SOL cursors?

1.A cursor is a view on a table


2.A cursor holds the rows (one or more) returned by a SQL statement.
3.The set of rows the cursor holds is referred to as the active set.
4.None of the above

Which of the following is not a grouping function?

1.COUNT
2.SUM
3.DISTINCT
4.MIN
5.All the above

Select invalid variable types

1.CHAR
2.VARCHAR1
3.VARCHAR2
4.INTEGER
5.NUMBER

In this PL/SQL statement, which of the following lines will produce an error?

1.cursor CAPITALS is
2.Select CITY, STATE
3.into my_city, my_state
4.from CITIES
Which of the following is true about the parameter modes in PL/SQL Subprograms?

1.An IN parameter lets you pass a value to the subprogram. It is a read-only parameter.
2.An OUT parameter returns a value to the calling program.
3.An IN OUT parameter passes an initial value to a subprogram and returns an updated value to the caller.
4.All of the above

Select the invalid PL/SQL looping construct.

1.WHILE LOOP
2.END LOOP
3.FOR rec IN some_cursor LOOP_END LOOP
3.LOOP_UNTIL;END LOOP
4.LOOP_EXIT WHEN ; END LOOP
5.None of the above All are valid

Which SELECT statement wilthe result 'elloworld' from the string 'HelloWorld"?

1.SELECT SUBSTR( "HelloWorld",1) FROM dual;


2.SELECT INITCAP(TRIM ("HelloWorld", 1,1) FROM dual,
3.SELECT LOWER(SUBSTR("Helloworld", 1, 1) FROM dual,
4.SELECT LOWER(SUBSTR("HelloWorld", 2, 1) FROM dual;
5.SELECT LOWER(TRIM ("H" FROM "HelloWorld") FROM dual;

Which of the following is NOT VALID is PL/SQL

1.Bool boolean;
2.NUM1, NUM2 number,
3.deptname dept.dname%type,
4.date1 date := sysdate
Which of the following is NOT VALID is PL/SQL

Functions for error trapping are contained in which section of a PL/SQL block?

1.Header
2.Declarative
3.Executable
4.Exception

Which of the following is an Oracle DDL function?

1.DECODE
2.DROP
3.TO_CHAR
4.NVL
5.all of these are Oracle DDL functions.
CREATE TABLE is a__ statememt.

1.DML
2.DDL
3 DCL
4.Transaction Control Language

____is a database object that groups logically related PL/SOL types, objects and subprograms.

1.Module
2.Package
3.Body
4.Name
oracle client

in,out,inout

Retrieve data more quickly and


efficiently.

NUM1. NUM2 number;

4. All are true.

Formal and Actual parameters


have different names.

Nesting of loops is not


allowed.
DROP.

Implicit.

The RETURN clause does not


specify the data type of the
return value.

PL/SQL

OPEN, FETCH, CLOSE

ELSIF

Logic error.
Exception

THEN

create type

A cursor is not a view on a


table

DISTINCT

VARCHAR1.

into my_city, my_state


All of the above

LOOP_UNTIL;END LOOP.

SELECT LOWER (TRIM ('H'


FROM 'Hello World')) FROM
dual

Bool boolean;

Exception

DROP
DDL

Package.

You might also like