A union variation that is more amenable to generic selects: select a,b,c,1 as tablename from real where id=123 and not exists (Select 1 from over where over.id = real.id) union select a,b,c,2 as tablename from over where id=123
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users