Question: How can I make SQL Developer display the number of rows returned by a query?
Answer: Execute the query, and fetch all the rows.
But I’m not seeing it!
and fetch all the rows.
This part is important.
Execution using ctrl+enter executes statement, and returns the FIRST ‘fetch’, by default of 50 records.
Warning: Rant ahead!
…Until All Rows Are Read – there’s one or more proceses on the server WAITING for you
So close these grids. Or read all the rows. Then you don’t have to worry about upsetting the DBA because you’re wasting server resources.
This becomes especially important if you enable the ‘More Grids’ preference.
Close when finished 🙂
I prefer it shows the query results as a column in sql history when i run the query first time. Some of the other product SQL tools actually show that. Does SQL developer not know how rows were fetched from the database for a successful query?
You want us to save the result of your query in the SQL History?
I was not very clear. No. The number of rows returned by the query.
Thanks. This was helpful.
would this apply to VIEWS? How can I read the returned rows in a view? Views don´t have the “count rows” option…
It applies to ANY query – whether we’re reading from a view or a table or a MV.
sorry what I am asking is, when I create a view, is there a way to read the resulting numbers of rows of that view?
Tables do have the option to “count rows” but views don´t…
you want feedback from your CREATE VIEW statement to include a current row count?
I want to know if, after creating a view, is there a direct way of knowing how many resulting rows it has, apart from the option of doing a select count query on that view (that is what I do now)
I also use the context menu on the grid and pick ‘Count Rows’
that will re-run the query, the numbers could be off, but should generally be ok if you’re ok with the perf hit of running the query again
How do you get it to show the count? The changes he suggests in Worksheet aren’t adding the count of rows returned for me
If it’s not showing the count, what IS it showing? How are you testing your scenario?