join two table for insert data in database in android
- by shadi
I have two table(t1,t2) in android,
t1 has a primary key that it is foreign key for t2,i want to insert data to this tables,is it necessary to join these two table?if yes, what is code for join these table?
i insert data in one of them like this:
public long insertQuote(String Quote,int Count1 )
{
ContentValues initialValues = new ContentValues();
initialValues.put(GoodName, Quote);
initialValues.put(CartID, Count1);
return db.insert(DATABASE_TABLE, null, initialValues);
}