shell script for saving oracle database records in variable

i want to retrieve value in each column of each row in sql plus
and save them into array variable and echo the value in array variable

This might be of some help:

#!/bin/bash
myarray=(  $(
sqlplus -s usr/passwd@${ORACLE_SID} << EOF | awk '{printf("\"%s\" ", $0)}' 
set pages 0
set feed off
select *
    from mytable;
exit    
EOF 
)
)
echo "elements:${#myarray[*]}"
echo "data: ${myarray[*]}"

You are far, far better off spooling to a file and then reading what you want.