FA1 - Sheet1 (1) Flashcards
The ______ clause is used in DML statement to specify variable(s) that will hold the value(s) that SQL returns from the SELECT clause.
INTO
The use of INTO clause in PL/SQL select statement is to specify the name of ________.
VARIABLE
The INTO clause occurs between the SELECT and _______ clauses.
FROM
The DML statement: INSERT, DELETE, ________ make changes to the database.
UPDATE
Which SQL statements cannot be used directly in PL/SQL?
Group of answer choices
DDL, DCL
DML
TCL
DML, TCL
DDL, DCL
What could be the possible error of the given code below?
DECLARE
v_sal_increase employees.salary%TYPE := 800;
BEGIN
UPDATE copy_emp
SET salary = salary + v_sal_increase
WHERE job_id = ‘ST_CLERK’;
END;
Group of answer choices
WHERE section
Variable declaration
No error
SET section
No error
What could be the possible error of the given code below?
DECLARE
v_sal_increase employees.salary%TYPE = 800;
BEGIN
UPDATE copy_emp
SET salary = salary + v_sal_increase
WHERE job_id = ‘ST_CLERK’;
END;
Group of answer choices
SET section
No error
WHERE section
Variable declaration
Variable declaration
The memory area allocated by Oracle server to store the SQL statement and the data that it uses in known as:
Cursor
The use of CASE statement to test conditions such as <, >, >=, <= is know as case expression.
False
Applying the logical operator NOT to a null yields FALSE.
False
The type of loop where the statement inside the loop must execute at least once.
BASIC
In BASIC and WHILE loop, the iteration will terminate when the counter is > than the upper bound.
Group of answer choices
True
False
In BASIC and WHILE loop, initialization of counter variable is necessary.
t
The ______ is a Boolean attribute that evaluates to TRUE if the most recent SQL statement did not return even one row.
SQL%NOTFOUND
The DDL and _______ SQL statements cannot be used directly in PL/SQL.
DCL
The _______cursor are automatically defined by Oracle.
IMPLICIT
What could be the possible error of the given code below?
DECLARE
v_salary employees.salary%TYPE;
BEGIN
SELECT salary INTO v_salary
FROM employees;
DBMS_OUTPUT.PUT_LINE(‘ Salary is : ‘ || v_salary);
END;
Query returns more than 1 row
The _______ statement selects rows from one table to update and/or insert into another table.
Group of answer choices
DML
COMBINE
MERGE
SELECT, INSERT, UPDATE
MERGE
What is missing in the given code below?
DECLARE
v_salary employees.salary%TYPE;
BEGIN
SELECT salary INTO ________
FROM employees where employee_id = 100;
DBMS_OUTPUT.PUT_LINE(‘ Salary is : ‘ || v_salary);
END;
V_SALARY
What could be the possible error of the given code below?
DECLARE
v_sum_sal NUMBER(10,2);
v_deptno NUMBER NOT NULL := 60;
BEGIN
SELECT SUM(salary)
INTO v_sum_sal FROM employees WHERE department_id = v_deptno;
DBMS_OUTPUT.PUT_LINE(‘Dep #60 Salary Total: ‘ || v_sum_sal);
END;
No error
Consider the given code fragment below. The condition will return a false value.
A:=null; B:=null;
If A = B then . . . . .
t