InterviewSolution
Saved Bookmarks
| 1. |
PL/SQL provides a user-defined record type. What is that? |
|
Answer» In PL/SQL, it is possible to create your own RECORDS i.e. user-defined. With that, you can set the different record structures. Let us take an example of a Laptop’s record. Here is how you can declare: DECLARE TYPE laptop IS RECORD (brand varchar(50), RAM number, SNO number, ); l1 laptop; l1 laptop;You can now access the fields using the dot(.) operator. The OUTPUT: Laptop 1 Brand = Dell Laptop 1 RAM = 4 Laptop 1 SNO = 87667 Laptop 2 Brand = Lenevo Laptop 2 RAM = 4 Laptop 2 SNO = 47656 Laptop 3 Brand = HP Laptop 3 RAM = 8 Laptop 2 SNO = 98989 |
|