join two table for insert data in database in android
Posted
by
shadi
on Stack Overflow
See other posts from Stack Overflow
or by shadi
Published on 2012-11-05T10:49:24Z
Indexed on
2012/11/05
11:01 UTC
Read the original article
Hit count: 259
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);
}
© Stack Overflow or respective owner