Hi ,
I have a query as under :
sel a.*,b.*
from tab1 a inner join tab2
on a.col1=b.col1
and a.col2=b.col2
The datatype of a.col1 and b.col1 matches. But the datatype of a.col2 and b.col2 doesn't match. From performance point of view , they should match. If not then it might lead to product join , even the stats on these columns may not be used.
To overcome this, i need to make their datatypes same. One option is to use cast i.e
sel a.*,b.*
from tab1 a inner join tab2
on a.col1=b.col1
↧