iphone - Question about FMDB and JOIN clause -
i'm using fmdb sqlite wrapper, pretty easy onto. encountered problem when try join 2 (in fact one) table.
to distinguish joined 2 table's columns, have use select a.a 'a.a', b.a 'b.a' the_table join the_table b on.... can use [rs stringforcolumn:@"a.a"] , [rs stringforcolumn:@"b.a"] access them (where rs of class fmresultset). have 15 columns sql string seems long. i'm wondering if there's easier way this?
using select * the_table join the_table b..., can access content of , b separately? may [rs resultsetforrenamedtable:@"a"];
well, fmdb wrapper on top of sqlite,
i suppose sqlite fire error if use * in particular case. like: sql error: ambiguous column name: a
Comments
Post a Comment