0

databases Online Quiz - 144

Description: databases Online Quiz - 144
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

Script component Can have only one Input flow and zero or more Output flows.

  1. True

  2. False


Correct Option: A

You created stored procedure DELETE_TEMP_TABLE that uses dynamic SQL to remove a table in your schema. You have granted the EXECUTE privilege to user A on this procedure. When user A executes the DELETE_TEMP_TABLE procedure, under whose privileges are the operations performed by default?

  1. SYS privileges

  2. Your privileges

  3. Public privileges

  4. User A’s privileges


Correct Option: D
  1. ALTER TABLE emp ADD CONSTRAINT ck_sal CHECK (sal BETWEEN sal AND sal*1.1);

  2. CREATE OR REPLACE TRIGGER check_sal BEFORE UPDATE OF sal ON emp - 6 - FOR EACH ROW WHEN (new.sal < old.sal OR new.sal > old.sal * 1.1) BEGIN RAISE_APPLICATION_ERROR ( - 20508, ‘Do not decrease salary not increase by more than 10%’); END;

  3. CREATE OR REPLACE TRIGGER check_sal BEFORE UPDATE OF sal ON emp WHEN (new.sal < old.sal OR new.sal > old.sal * 1.1) BEGIN RAISE_APPLICATION_ERROR ( - 20508, ‘Do not decrease salary not increase by more than 10%’); END;

  4. CREATE OR REPLACE TRIGGER check_sal AFTER UPDATE OR sal ON emp WHEN (new.sal < old.sal OR -new.sal > old.sal * 1.1) BEGIN RAISE_APPLICATION_ERROR ( - 20508, ‘Do not decrease salary not increase by more than 10%’); END;


Correct Option: B
  1. Use a drop procedure statement to drop a standalone procedure.

  2. Use a drop procedure statement to drop a procedure that is part of a package. Then recompile the package specification.

  3. Use a drop procedure statement to drop a procedure that is part of a package. Then recompile the package body.

  4. For faster removal and re-creation, do not use a drop procedure statement. Instead, recompile the procedure using the alter procedure statement with the REUSE SETTINGS clause.


Correct Option: A
  1. FOR EACH ROW trigger on the EMP table.

  2. Statement-level trigger on the EMP table.

  3. FOR EACH ROW trigger on the AUDIT_TABLE table

  4. Statement-level trigger on the AUDIT_TABLE table


Correct Option: A
  1. Oracle Advanced Queuing

  2. DBMS_JOB

  3. DBMS_SQL

  4. Pipelined Functions


Correct Option: C
  1. SELECT name FROM USER_DEPENDENCIES WHERE referenced_name = 'DBMS_OUTPUT.PUT_LINE'

  2. SELECT name from ALL_SOURCE WHERE owner = USER AND name = 'DBMS_OUTPUT.PUT_LINE'

  3. SELECT DISTINCT name from ALL_SOURCE WHERE INSTR (text, 'DBMS_OUTPUT.PUT_LINE') > 0

  4. SELECT DISTINCT name from USER_SOURCE WHERE INSTR (UPPER (text), 'DBMS_OUTPUT.PUT_LINE') > 0


Correct Option: D
  1. When a SELECT statement returns no rows

  2. When a SELECT statement returns more than one row

  3. When the datatypes of SELECT clause and INTO clause do not match

  4. When INTO statement is missing in the SELECT statement


Correct Option: A,B

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

  1. Header

  2. Declarative

  3. Executable

  4. Exception


Correct Option: C,D
  1. Begin null; end;

  2. Declare x varchar2(100); begin dbms_output.put_line(x); end;

  3. Begin .. statement1; exception ... end;

  4. Begin dbms_output.put_line(sysdate); end;;


Correct Option: A

Maximum no of non clustered index in a table.

  1. 192

  2. 255

  3. 249

  4. 300


Correct Option: C

Maximum no of columns in a key.

  1. 1

  2. 31

  3. 16

  4. 255


Correct Option: B

The maximum allowable size of the combined index values

  1. 255

  2. 600

  3. 256

  4. 32


Correct Option: B

maximum length for comments

  1. there is no limit

  2. 16843

  3. 255

  4. 1024


Correct Option: A

maximum of triggers in sybase

  1. 3

  2. 12

  3. 6

  4. 9


Correct Option: A
- Hide questions