Question : .* count

why does't the sql engine return only the distinct values for each table, when only that table data is asked for?

select tablea.* from tablea,tableb where tablea_pk = tablea_fk
select tableb.* from tablea,tableb where tablea_pk = tablea_fk

Answer : .* count

although you have used tablea.*, it will give you all records based on join condition

select tablea.* from tablea,tableb where tablea_pk = tableb_fk
select tableb.* from tablea,tableb where tableb_pk = tablea_fk

If you want distinct data then try the following:

select distinct  a.field1, a.field2 from tablea a, tableb b where a.table_pk = b.table_pk
Random Solutions  
 
programming4us programming4us