MySQL Forums
Forum List  »  Oracle

Re: COUNT (*) OVER ()
Posted by: irek kordirko
Date: February 29, 2012 10:56AM

jongse park Wrote:
-------------------------------------------------------
> How can I convert Oralce COUNT(*) OVER() to MySQL?

It depends on an analytic clause inside brackets just after the OVER clause.
If there is no analytic clause (a simplest case), just OVER(),
then the whole expression is equivalent to SELECT count(*) FROM table.

Example:
SELECT col1, col2,
        COUNT(*) OVER()
FROM table

is equivalent to:
SELECT col1, col2,
       ( SELECT COUNT(*) FROM table )
FROM table



Edited 1 time(s). Last edit at 02/29/2012 05:07PM by irek kordirko.

Options: ReplyQuote


Subject
Views
Written By
Posted
7882
February 28, 2012 11:14PM
Re: COUNT (*) OVER ()
36167
February 29, 2012 10:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.