Datagrip - get row count (easily) on queries with

2019-06-17 03:26发布

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.

标签: datagrip
3条回答
beautiful°
2楼-- · 2019-06-17 03:50

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

enter image description here

查看更多
狗以群分
3楼-- · 2019-06-17 04:02

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).

查看更多
我只想做你的唯一
4楼-- · 2019-06-17 04:03

Click on page-size of the result-set

count(*) in DataGrip

查看更多
登录 后发表回答