PL/SQL Collections: record type : Record Data Type « PL SQL « Oracle PL / SQL

Oracle PL / SQL
1. Aggregate Functions
2. Analytical Functions
3. Char Functions
4. Constraints
5. Conversion Functions
6. Cursor
7. Data Type
8. Date Timezone
9. Hierarchical Query
10. Index
11. Insert Delete Update
12. Large Objects
13. Numeric Math Functions
14. Object Oriented Database
15. PL SQL
16. Regular Expressions
17. Report Column Page
18. Result Set
19. Select Query
20. Sequence
21. SQL Plus
22. Stored Procedure Function
23. Subquery
24. System Packages
25. System Tables Views
26. Table
27. Table Joins
28. Trigger
29. User Previliege
30. View
31. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL / SQL » PL SQL » Record Data Type 
PL/SQL Collections: record type
  
SQL>
SQL> Set serverout on
SQL> declare
  2    type location_record_type is record (
  3      street_address       varchar2(40),
  4      postal_code          varchar2(12),
  5      city                 varchar2(30),
  6      state_province       varchar2(25),
  7      country_id           char(2not null := 'US'
  8    );
  9
 10    l_my_loc location_record_type;
 11  begin
 12    l_my_loc.street_address  := '1 Way';
 13    l_my_loc.postal_code     := '22222';
 14    l_my_loc.city            := 'ABC';
 15    l_my_loc.state_province := 'VA';
 16    dbms_output.put_line'MY LOCATION IS:' );
 17    dbms_output.put_linel_my_loc.street_address );
 18    dbms_output.putl_my_loc.city||', '||l_my_loc.state_province );
 19    dbms_output.put_line' '||l_my_loc.postal_code );
 20    dbms_output.put_linel_my_loc.country_id );
 21  end;
 22  /
MY LOCATION IS:
Way
ABC, VA 22222
US

PL/SQL procedure successfully completed.

SQL>
SQL>

   
  
Related examples in the same category
1. The %ROWTYPE can also be used to create a record based on the structure of a cursor
2. A simple record that holds a person's name, phone number, and birth date and fill data in
3. Declare the record data type
4. Load a row in table to record type
5. A record is populated using a SELECT statement
6. declare record with not null attribute
7. Assign a wrong record type
8. This block shows legal and illegal record assignments.
9. How to select into a record.
10. Select into Records
11. Record type
12. Using explicit definition to define record types and a compound record type; and, the use of nested types
13. Nest records, access the names of the nested records by using another component selector, or period
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.