Oracle Sql Loop Through Select Statement Syntax