Number of rows in OrientDB

How to get a specific number of rows in Java from an object database?

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

+5
source share
2 answers

Try using * as a field:

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

+5
source

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

+1
source

All Articles