Solved

MySQL: Get results from one table only

Posted on 2014-02-17
1
234 Views
Last Modified: 2014-02-17
This returns every column twice!  
SELECT * FROM promos.elqBooks_new t1 LEFT JOIN promos.elqBooks t2 ON t1.isbn = t2.isbn WHERE t2.isbn IS NOT NULL LIMIT 1

Open in new window

I only want the results from the table `promos.elqBooks_new`
0
Comment
Question by:hankknight
1 Comment
 
LVL 42

Accepted Solution

by:
Chris Stanyon earned 500 total points
Comment Utility
You need to select from the specific table alias:

SELECT t1.* FROM promos.elqBooks_new t1 LEFT JOIN promos.elqBooks t2 ON t1.isbn = t2.isbn WHERE t2.isbn IS NOT NULL LIMIT 1

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now