{"id":326,"date":"2012-10-09T20:26:25","date_gmt":"2012-10-09T20:26:25","guid":{"rendered":"http:\/\/62.131.51.129\/wordpress\/?p=326"},"modified":"2012-10-09T20:26:25","modified_gmt":"2012-10-09T20:26:25","slug":"how-many-records-in-a-table","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=326","title":{"rendered":"How many records in a table?"},"content":{"rendered":"<p>Recently, I encountered a very nice script that allows us to get an overview of the number of records per table in an Oracle scheme. First the script:<\/p>\n<pre>set termout off echo off feed off trimspool \non head off pages 0\n\nspool C:\\countall.tmp\nselect 'SELECT count(*), '''||table_name||''' \nfrom '||table_name||';'\nfrom   user_tables\n\/\nspool off\n\nset termout on\n@@c:\\countall.tmp\n\nset head on feed on<\/pre>\n<p>The output then looks like:<\/p>\n<p><a href=\"http:\/\/62.131.51.129\/wp-content\/uploads\/2012\/10\/OracleScript2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/62.131.51.129\/wp-content\/uploads\/2012\/10\/OracleScript2.jpg\" alt=\"\" title=\"OracleScript\" width=\"677\" height=\"342\" class=\"alignnone size-full wp-image-339\" \/><\/a><\/p>\n<p>As you can see, I stored the script in a file c:\\a.sql, where I copied the script. The resulting output showed itself in the terminal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I encountered a very nice script that allows us to get an overview of the number of records per table in an Oracle scheme. First the script: set termout off echo off feed off trimspool on head off pages 0 spool C:\\countall.tmp select &#8216;SELECT count(*), &#8221;&#8217;||table_name||&#8221;&#8217; from &#8216;||table_name||&#8217;;&#8217; from user_tables \/ spool off set [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-326","post","type-post","status-publish","format-standard","hentry","category-nice-to-know"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/326\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}