Search Header Logo

Oracle/PLSQL

Authored by phe nguyen

Education

1st - 5th Grade

9 Questions

Oracle/PLSQL
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

A - Large Object or LOB data types are pointers to large objects that are stored separately from other data items, such as text, graphic images, video clips, and sound waveforms.

B - The composite data types have data items that have internal components that can be accessed individually. For example, collections and records.

C - References are pointers to other data items.

D - All of the above.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong in the following code?

DECLARE c_id := 1; c_name customers.name%type; c_addr customers.address%type; BEGIN SELECT name, address INTO c_name, c_addr FROM customers WHERE id = c_id; END;

A - You cannot use the SELECT INTO statement of SQL to assign values to PL/SQL variables.

B - The SELECT INTO statement here is wrong. It should be: SELECT c_name, c_address INTO name, addr

C - The WHERE statement is wrong. It should be: WHERE id := c_id;

D - The variable c_id should be declared as a type-compatible variable as −

c_id customers.id%type := 1;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following is true about the following code snippet?

DECLARE a number(3) := 100;

BEGIN

IF (a = 50 ) THEN dbms_output.put_line('Value of a is 10' );

ELSEIF ( a = 75 ) THEN dbms_output.put_line('Value of a is 20' );

ELSE dbms_output.put_line('None of the values is matching');

END IF;

dbms_output.put_line('Exact value of a is: '|| a );

END;

A - It has syntax error.

B - It will print 'None of the values is matching'.

C - It will print

None of the values is matching

Exact value of a is: 100

D - None of the above.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about the parameter modes in PL/SQL Subprograms?

A - An IN parameter lets you pass a value to the subprogram. It is a read-only parameter.

B - An OUT parameter returns a value to the calling program.

C - An IN OUT parameter passes an initial value to a subprogram and returns an updated value to the caller.

D - All of the above.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for creating an explicit cursor?

A - CURSOR cursor_name IS select_statement;

B - CREATE CURSOR cursor_name IS select_statement;

C - CREATE CURSOR cursor_name AS select_statement;

D - CURSOR cursor_name AS select_statement;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not true about PL/SQL package specifications?

A - The specification is the interface to the package.

B - It declares the types, variables, constants, exceptions, cursors, and subprograms that can be referenced from outside the package.

C - It contains all information about the content of the package and the code for the subprograms.

D - None of the above.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following code is the correct syntax for creating an index-by table named salary that will store integer values along with names and the name field will be the key?

A - TYPE salary IS TABLE OF NUMBER INDEX BY VARCHAR2(20);

B - CREATE TABLE salary OF NUMBER INDEX BY VARCHAR2(20);

C - TYPE salary IS INDEXED TABLE OF NUMBER INDEX BY VARCHAR2(20);

D - None of the above.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?