02 |
type apollo_rec is record( |
03 |
commander varchar2(100), |
05 |
type apollo_type_arr is table of apollo_rec index by varchar2(100); |
06 |
apollo_arr apollo_type_arr; |
08 |
apollo_arr( 'Apollo 11' ).commander := 'Neil Armstrong' ; |
09 |
apollo_arr( 'Apollo 11' ).launch := to_date( 'July 16, 1969' , 'Month dd, yyyy' ); |
10 |
apollo_arr( 'Apollo 12' ).commander := 'Pete Conrad' ; |
11 |
apollo_arr( 'Apollo 12' ).launch := to_date( 'November 14, 1969' , 'Month dd, yyyy' ); |
12 |
apollo_arr( 'Apollo 13' ).commander := 'James Lovell' ; |
13 |
apollo_arr( 'Apollo 13' ).launch := to_date( 'April 11, 1970' , 'Month dd, yyyy' ); |
14 |
apollo_arr( 'Apollo 14' ).commander := 'Alan Shepard' ; |
15 |
apollo_arr( 'Apollo 14' ).launch := to_date( 'January 31, 1971' , 'Month dd, yyyy' ); |
17 |
dbms_output.put_line(apollo_arr( 'Apollo 11' ).commander); |
18 |
dbms_output.put_line(apollo_arr( 'Apollo 11' ).launch); |
http://tylermuth.wordpress.com/2008/02/21/plsql-associative-arrays/
Komentarze są wyłączone
Brak komentarzy.
Przepraszamy, możliwość dodawania komentarzy jest obecnie wyłączona.