Ispirer Website Ispirer Capabilities - Oracle Migration Free Trial

Oracle COUNT function to HiRDB

COUNT function without OVER clause

HiRDB database supports COUNT function without OVER clause. SQLWays leaves it as is.

Oracle:

select COUNT(a) from t; 

HiRDB:

select COUNT(a) from t; 

COUNT function with OVER clause

SQLWays changes COUNT function with over clause to sub query.

Oracle:

SELECT COUNT(c1) OVER (partition by b) FROM T1 WHERE c3=c2; 

HiRDB:

SELECT(SELECT  COUNT(c1) FROM T1 Swt_Alias WHERE c3 = c2 AND Swt_Alias.b = T1.b) AS Swc_Alias FROM T1 WHERE c3 = c2; 

COUNT(*) OVER()

SQLWays leaves COUNT(*) OVER() as is.

Oracle:

select COUNT(*) OVER() from t; 

HiRDB:

select COUNT(*) OVER() from t; 

References in Wiki

Database Reference
Oracle COUNT
HiRDB COUNT

© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.