Join two SQLite tables in android application

I need to join two tables into a relational table. I know that i can do this with inner join but i don't know how to start.

TABLE_SOCIO

-id

-name

-phone

-email

TABLE QUOTA

-id

-name

-description

-value

Now i need to join this two in on unic table by the id's of each.

RELATIONAL TABLE

-id_Quota

-id_Socio

I have 1 id_Quota to n id's_Socio. It's a relation 1-n. I have an array list with the set od id_Socio that i need to save in relational table with only one id_Quota.

Any ideias? How i can start with inner join? Foreign key it's need? Any example?

Thank you for your help

Answers


SELECT  t1.name, t1. phone,
        t2.description, t2.value
FROM    TABLE_SOCIO t1
        INNER JOIN RELATIONALTABLE r ON t1.Id = r.id_Socio
        INNER JOIN TABLE_QUOTA t1 ON t2.Id = r.id_Quota

Need Your Help

Getting java.lang.ClassCastException: javax.swing.KeyStroke when creating a JSplitPane

java swing jsplitpane

I'm getting a random unreproducible Error when initializing a JSplitPane in with JDK 1.5.0_08. Note that this does not occur every time, but about 80% of the time:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.