Solved

if value is already in the second table do not select

Posted on 2013-12-19
2
206 Views
Last Modified: 2013-12-20
profile_id is varchar

SELECT profile_id
            FROM a_messages
            WHERE

where profile_id is NOT in profiles
so profiles.profile_id does not exist

because if the value is already profiles table, there is no need to use it
0
Comment
Question by:rgb192
2 Comments
 
LVL 8

Accepted Solution

by:
vr6r earned 500 total points
Comment Utility
SELECT a_messages.profile_id
FROM a_messages
LEFT JOIN profiles on profiles.profile_id = a_messages.profile_id
WHERE profiles.profile_id IS NULL

Open in new window

0
 

Author Closing Comment

by:rgb192
Comment Utility
thank you
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

18 Experts available now in Live!

Get 1:1 Help Now