codice:select count(*) from( select comuni.id, comuni.item from comuni where comuni.id=1 union select comuni.id, comuni.item from comuni where comuni.id=2 union select comuni.id, comuni.item from comuni where comuni.id=3 union select comuni.id, comuni.item from comuni where comuni.id<5 )
nel tuo caso:
ricordati che la union ti restituisce solo righe diverse tra loro.codice:select id_tb1 as id ,nome,cognome from tb1 union select id_tb2 as id ,nome,cognome from tb2 union select id_tb3 as id ,nome,cognome from tb3
ciao

Rispondi quotando