You are viewing a single comment's thread. Return to all comments →
(SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY), CITY LIMIT 1)
(SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC, CITY ASC LIMIT 1)
Why LIMIT 1?
So that only one value gets printed.
but we also have to print cities of same lenghth! so will it work for that?
Since you just need to print one of the shortest or longest item.
this doesn't work in oracle. is there any keyword 'limit' in oracle cause i have serched and didn't found any??
Thats what im looking for bro. Beside "where rownum <= num" which wont work for this because of all the other stuff