i have a table like this.

cityno cityname mails
1 BANGALORE 8KM
2 HSR LAYOUT 20KM
3 MEJISTIC 30KM
4 JAYADEVA 55KM
5 ITPL 80KM
6 HEBBAL 115KM

I HAVE DATA LIKE THIS

I WANT O/P LIKE THIS
DISTANCE NO.OFCITY
0-50KM 3
51-100KM 2
101-150KM 4

AND SO ON

pls give me answer. i want urgent

Answer Posted / ram

pls send me pl/sql script also

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

differentiate between float and double. : Sql dba

561


Why join is faster than subquery?

601


How do you delete data from a table?

546


What jobs use sql?

531


What is embedded sql in db2?

507






What does the hierarchical profiler does?

570


What is the function that is used to transfer a pl/sql table log to a database table?

555


How will you distinguish a global variable with a local variable in pl/sql?

626


What is sp_helptext?

592


Write an sql query to select all records from the table?

558


What is raid? How does it help storage of databases?

603


What does pl sql stand for?

657


How many sql statements are used? Define them.

576


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

560


What is group by in sql?

550