Datagrip - get row count (easily) on queries with

2019-06-17 04:02发布

问题:

Is there a way (setting or shortcut) for displaying the total row count of a query that outputs more than 500 rows - that is, without modifying the "Result set page size" value in preferences? I'm looking essentially for the output of select count(*) from (<query>) t in addition to the displayed rows.

回答1:

Click on page-size of the result-set



回答2:

Alternative to accepted answer (clicking to page-size), click the Last Page icon and it shows the count of items



回答3:

Answering my own question and not accepting it because I'm hoping there's a better way, but you can create a live template:

SELECT count(*) FROM ($SELECTION$) tablenameyoullneveruse

Select your query, then use Surround with Live Template...

Still hoping for a simultaneous solution (not have to build 2nd query).



标签: datagrip