Frage

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

War es hilfreich?

Lösung

Try using * as field:

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

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top