Datagrip - get row count (easily) on queries with more than 500 results

空扰寡人 提交于 2019-12-10 12:36:42

问题


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



来源:https://stackoverflow.com/questions/42250766/datagrip-get-row-count-easily-on-queries-with-more-than-500-results

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!