Constants pi type p decimals 2 value '3.1'

Classified in Computers

Written at on English with a size of 4.81 KB.

 

Module 3 Quiz

1.Structured Query Language (SQL) is considered a procedural language. False
2.PL/SQL fully supports SQL data types. True
3. The term anonymous blocks refers to blocks of code that are not stored for reuse and do not exist after being executed. True
4.The BEGIN section of a PL/SQL block contains code that creates variables, cursors, and types. True
5. Assignment statements are used to put or change the values of variables. True
6. A disadvantage of using the %TYPE attribute is that there is a slight performance hit in that the database server must look up the data type from the data dictionary. True
7. A collection is a data type that can store multiple values of different data types as one unit. False
8. A scalar variable can hold multiple values whereas a composite variable can hold only a single value. False
9. A variable declared with a record type can hold one row of data consisting of a number of column values. True
10. When placing data into a table of records variable, you must indicate the field that will hold the value but you need not indicate the row. False
11. SQL is NOT a ____.Procedural language
12. All of the following are considered to be programming languages, except ____. Oracle
13. Which of the following statements is true? Oracle considers PL/SQL to be a procedural language extension of SQL.
14. Procedural languages allow developers to ____. Perform decision-making logic
15. The term portability refers to the ability of PL/SQL to ____. Run on any platform that Oracle can run on
16. Which of the following is considered the brains behind the screens? Programming logic
17. Which of the following serves as a visual representation of a database? ERD
18. The only required sections of a PL/SQL block are the ____ sections. BEGIN & END
19. The ____ section of a PL/SQL block contains code that creates variables, cursors, and types. DECLARE
20. ____ are used to change the values of variables. Assignment statements
21. The ____ section of a PL/SQL block contains handlers that allow you to control what the application will do if an error occurs when the executable statements are processed. EXCEPTION
22. Which of the following lines of code is syntactically correct?
DECLARE
order NUMBER(3);
departure DATE;
BEGIN
---- executable statements ---
END;
23. Which of the following initializes the variable order?
DECLARE
order NUMBER(2) := 0;
departure DATE;
BEGIN
---- executable statements ---
END;

Question 241 / 1 point
Which of the following PL/SQL blocks requires the variable to always contain a particular value within the block?
DECLARE
order CONSTANT NUMBER(2,2) := .02;
departure DATE;
BEGIN
---- executable statements ---
END;
25. DECLARE
order NUMBER(2) := 4;
total_amt NUMBER(2);
BEGIN
total_amt := order * 8;
END;
According to the statement block above, what value is stored in the variable total_amt? 32
26. Which of the following statement blocks correctly uses a scalar variable in an assignment statement?
DECLARE
order NUMBER(2) := 4;
total_amt NUMBER(2);
BEGIN
total_amt := 12 * order;
END;
27. A(n) ____ is a variable that can store and handle multiple values of the same data type as one unit. Collection
28. Which of the following code fragments correctly creates a record data type that will hold four variables?
DECLARE
TYPE type_basket IS RECORD (
basket bb_basket.IdBasket%TYPE,
created bb_basket.Dtcreated%TYPE,
qty bb_basket.Quantity%TYPE,
sub bb_basket.Subtotal%TYPE );
rec_basket type_basket;
BEGIN
--- executable code ---
END;
29. DECLARE
TYPE type_basket IS RECORD(
basket bb_basket.IdBasket%TYPE,
created bb_basket.Dtcreated%TYPE,
total bb_basket.Cost%TYPE,
qty bb_basket.Quantity%TYPE,
sub bb_basket.Subtotal%TYPE);
rec_basket type_basket;
BEGIN
--- executable code ---
END;
According to the code fragment above, which variable is declared using the type_basket data type? Rec_basket

Entradas relacionadas: