I've got tables like this:
Table Articles
---------------
AID(PK) Name PublisherID Words
Table Books
---------------
BID(PK) Title PublisherID Date
I want to merge them like:
Table Total
---------------
Title PublisherID
In this new table, Name in Table.Articles will belong to Title column, because.. Articles.Name and Books.Title mean the same thing :)
Any answers will be very appreciated :)
Thanks
select title, publisherid from books
union all
select name, publisherid from articles
As I understand, you are looking for the result of this:
select name, publisherId
from TableArticles
union
select title, publisherId
from TableBooks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With