这是我的两张桌子-
private static final String SQL_CREATE_RETAIL_DB_PRODUCT =
"CREATE TABLE " + DatabaseContract.RetailDatabaseEntry.TABLE_NAME_PRODUCT + " (" +
DatabaseContract.RetailDatabaseEntry.COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
DatabaseContract.RetailDatabaseEntry.COLUMN_PRODUCT_ID + INTEGER_TYPE + COMMA_SEP +
DatabaseContract.RetailDatabaseEntry.COLUMN_NAME + TEXT_TYPE + COMMA_SEP +
DatabaseContract.RetailDatabaseEntry.COLUMN_IMAGE + BLOB_TYPE + COMMA_SEP +
DatabaseContract.RetailDatabaseEntry.COLUMN_QUANTITY + INTEGER_TYPE + COMMA_SEP +
DatabaseContract.RetailDatabaseEntry.COLUMN_PRICE + INTEGER_TYPE +
" )";
private static final String SQL_CREATE_RETAIL_DB_SCAN =
"CREATE TABLE " + DatabaseContract.RetailDatabaseEntry.TABLE_NAME_SCAN + " (" +
DatabaseContract.RetailDatabaseEntry.COLUMN_PRODUCTID_ID + INTEGER_TYPE + ")";
我想将产品表的列 productid 与扫描表的 productid 匹配。并且根据匹配我必须检索数据。
请建议我解决方案,因为我是 android 新手。