Search code examples
iphoneipadsqlitexcode4

how to create category with SQLITE in iphone


i have a sqlite database like this :

table1:

categoryID     name   description
    1            a         dog
    1            b          cat
    2            c          elephant
    2            d        bird

table2:

categoryID      categoryName
    1               ex1
    2                ex2
    3               ex4

how to want to create category in first view with categoryID and categoryName ?


Solution

  • Do you mean a join? Some like: SELECT Table1.name, Table2.CategoryName FROM Table1, Table2 WHERE Table1.categoryId = Table2.categoryId AND Table1.categoryId = 1;