SQL Select distinct values from multiple tables -
so here's setup have 2 tables old , new following (simplified) schemas
old [manname] [mannumber] new [manager_name] [manager_number]
i'm looking craft sql query returns following in 4 columns in 1 query opposed 2 queries 2 columns each
select distinct manname, mannumber old select distinct manager_name, manager_number new
so ideal result set have 4 columns:
manname mannumber manager_name manager number
thanks!
have tried join statement:
select distinct * old join new b on a.manname = b. manager_name , a. mannumber = b. manager_number
Comments
Post a Comment