where rownum=1 query taking time in Oracle
问题 I am trying to execute a query like select * from tableName where rownum=1 This query is basically to fetch the column names of the table.There are more than million records in the table.When I put the above condition its taking so much time to fetch the first row.Is there any alternate to get the first row. 回答1: Try this: select * from tableName where rownum<=1 There are some weird ROWNUM bugs, sometimes changing the query very slightly will fix it. I've seen this happen before, but I can't