开发者

How to retrieve a value from a particular column through cursor in android?

I am executing a query to select the maximum salary of an employee. The result is stored in the cursor. How can I get the va开发者_开发知识库lue of the maximum(salary) from the cursor?


Please follow the below code .

cursor.getInt(cursor.getColumnIndex("your field")));  


select MAX(SALARY) as BigSalary FROM Employee

cursor.getInt(cursor.getColumnIndex("BigSalary"));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜