Question

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

Was it helpful?

Solution

Try using * as field:

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top