Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OrientDB row count

Tags:

java

orientdb

How to get specific row count in Java from Object DB ?

I need to get result for query like : SELECT COUNT(id) FROM Users WHERE banned=true

like image 704
Jhon Avatar asked Jul 05 '12 08:07

Jhon


2 Answers

Try using * as field:

SELECT COUNT(*) as count FROM Users WHERE banned = false

like image 135
Lvca Avatar answered Oct 22 '22 12:10

Lvca


OrientDB does support SQL like queries and also supports the count(<field>|*) function according to the documentation: http://code.google.com/p/orient/wiki/SQLWhere#Functions

like image 39
csupnig Avatar answered Oct 22 '22 14:10

csupnig