编程语言
首页 > 编程语言> > android-如何将ExecuteScalar移植到Java?

android-如何将ExecuteScalar移植到Java?

作者:互联网

SqlCommand.ExecuteScalar Method
Executes the query, and returns
the first column of the first row in the result set returned by the
query. Additional columns or rows are ignored.

我想这将涉及大量使用泛型.

假设我有一个SQLiteDatabase/Cursor对象.

解决方法:

看看SQLLiteStatement

long simpleQueryForLong() Execute a statement that returns a 1 by 1
table with a numeric value.

String simpleQueryForString() Execute a statement that returns a 1 by 1 table with a text value.

标签:sqlite,sql-server-express,java,c,android
来源: https://codeday.me/bug/20191102/1989830.html