Solved

MySQL: Get results from one table only

Posted on 2014-02-17
1
239 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 43

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 39865220
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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