I'm looking for a way to join relational tables on a PK similar to MySQL "using" so that I can eliminate duplicate columns.
Here is an example:
select *
from MovieHasDirector
join Director on MovieHasDirector.directorID = Director.directorID
where Director.name
like '%Steven Spiel%'
Returns:
3818 976 976 Steven Spielberg
3962 976 976 Steven Spielberg
4317 976 976 Steven Spielberg
4715 976 976 Steven Spielberg
When what I really want is:
3818 976 Steven Spielberg
3962 976 Steven Spielberg
4317 976 Steven Spielberg
4715 976 Steven Spielberg
You can see the duplicate directorID column is gone. In MySQL you can do this with the using(directorID) instead of the ON directorID = directorID
Of course I am trying to do this without having to manually specify the Select MovieHasDirector.movieID, Director.* I want the returned records to overlap the columns that are the same. How can I do this?