Give three methods used in assigning values to the rows in a PL/SQL table.
What will be an ideal response?
You can assign values to the rows in a table in three different ways:
? Direct assignment
? Assignment in a loop
? Aggregate assignment
Direct assignment. You can assign a value to a row with an assignment statement as you
already have learned in the previous topic. This is preferable if only a few assignments are
to be made. If an entire database table’s values are to be assigned to a table, a looping
method is preferable.
Assignment in a loop. You can use any of the three PL/SQL loops to assign values to
rows in a table. The program block in Fig. 13-3 assigns all Sunday dates for the year 2003 to a table. The primary key index value will vary from 1 to 52. The table column will contain dates for 52 Sundays. If are innovative, you can create great applications with loops and tables.Aggregate assignment. You can assign a table’s values to another table. The data types of both tables must be compatible. When you assign a table’s values to another table, the table receiving values loses all its previous primary key values as well as its data column values. If you assign an empty table with no rows to another table with rows, the recipient table is cleared. It loses all its rows. Both tables must have the same type for such an assignment.
You might also like to view...
To open the SubReport Wizard in Design view, you click the Subform/Subreport button in the ________ group
A) Tools B) Controls C) Reports D) Forms
Describe a method for protecting users against URL obfuscation attacks
What will be an ideal response?