>if i have 5 tables and all of it has column X and i wanted to get unique
>values in column X for all tables..
>can i do it in one query?
sure. this is one way to do this:
select distinct foo.X from (
select X from table1
union
select X from table2
....
) as foo;
if the values are unique within every table, then you might want to omit the
surrounding select.