如何在下面的特定時間之後返回總作業數的查詢是我的sqllite表我現在正在使用Java獲取當前時間如何查詢哪個返回的總數在特定時間之後工作?select查詢在特定時間之後返回的作業數
private static final String TABLE_COMPLETED_JOBS = "jobs";
String CREATE_COMPLETED_TABLE = "CREATE TABLE " + TABLE_COMPLETED_JOBS
+ "(" + KEY_COMPID + " INTEGER PRIMARY KEY," + KEY_TIMEJOB
+ " TEXT," + KEY_PICK + " TEXT," + KEY_DEST + " TEXT,"
+ KEY_FARE + " TEXT,"
+ KEY_TIMEWEEK + " DateTime" + ")";
String selectQuery = "SELECT * FROM " + TABLE_COMPLETED_JOBS + " ORDER BY
"+KEY_TIMEWEEK+" ;
String mydate =
java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());
select count(*)或select查詢會返回一個結果集,返回的行數count cud給你count –
給我舉例查詢plz – user3416078