user2071152 user2071152 - 4 months ago 37
Swift Question

Join 2 different tables in sqlite

There are two tables TableA & TableB which has to be merged and shown.
for e.g.,

Table A has columnA, columnB
Table B has column1, column2, column3


I want to merge / join these two table and resultant should be

columnA, columnB, column1, column2, column3


Please help me how can i form the query? Is it possible to use join or union queries?

Answer

Your query should be like,

 select * from TableA join TableB

It will merge both table like you want and resultant table have n x m records. n is number of records in TableA and m is number of records in TableB