oracle - What does PARTITION BY 1 mean? -


for pair of cursors total number of rows in resultset required after first fetch, ( after trial-and-error ) came query below

select  col_a,  col_b,  col_c,  count(*) over( partition 1 ) rows_in_result   mytable join theirtable on  mytable.col_a = theirtable.col_z group  col_a, col_b, col_c order   col_b 

now when output of query x rows, rows_in_result reflects accurately.

  • what partition 1 mean?
    • i think tells database partition results pieces of 1-row each

it unusual use of partition by. put same partition if query returns 123 rows altogether, value of rows_in_result on each row 123 (as alias implies).

it therefore equivalent more concise:

count(*) on () 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -