select same column names from multiple tables

I have 3 tables with the same column names.  I need to select all records from the three columns but i'm getting a query that has a bunch of duplicate results.

BOOKS                     Publications            Articles
---------                   --------------            -----------
book_id                     book_id                 book_id
book_name                book_name           book_name

I need to query the 3 tables and get results of all.  They all will have differing id's as i started the seed at different numbers

This is what i have so far...

SELECT books.book_name, books.book_id, publications.book_name, publications.book_id, articles.book_id, articles.book_name
FROM books, publications, articles
tags266Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcmonapCommented:
Hi tags266,

This might work for you:

SELECT
      Book_ID
      , Book_Name
FROM
      Books
UNION ALL
SELECT
      Book_ID
      , Book_Name
FROM
      Publications
UNION ALL
SELECT
      Book_ID
      , Book_Name
FROM
      Articles
mcmonapCommented:
Do you need to know which table they came from? This would identify them

SELECT
      'Books' TableName
      , Book_ID
      , Book_Name
FROM
      Books
UNION ALL
SELECT
      'Publications'
      , Book_ID
      , Book_Name
FROM
      Publications
UNION ALL
SELECT
      'Articles'
      , Book_ID
      , Book_Name
FROM
      Articles

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tags266Author Commented:
Ok, that worked...One more thing.. i'm going to populate a pull-down menu where the user is going to select one of those fields.  Then, i'm going to perform an insert statement into another table.  How do i define which table that came from in my insert statement???
mcmonapCommented:
Hi tags266,

I guess that would depend on what you are coding in (I'm not much of a coder).  I do think it is possible to have a dropdown box maintain a other values as well as the ones it is showing though.  You might be best off posting in one of the programming forums - or see if someone lese knows here.
tags266Author Commented:
Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.