abs0lut Posted August 4, 2008 Share Posted August 4, 2008 I need to select userid from tblusers that is not in tbltopics. could you please help me? Link to comment https://forums.phpfreaks.com/topic/118021-selecting-userid-that-is-not-in-other-table/ Share on other sites More sharing options...
cooldude832 Posted August 4, 2008 Share Posted August 4, 2008 something like SELECT T1.UserID as UserID FROM `tblusers` as T1 WHERE T1.UserID !IN(SELECT UserID FROM `tbltopic`) Link to comment https://forums.phpfreaks.com/topic/118021-selecting-userid-that-is-not-in-other-table/#findComment-607193 Share on other sites More sharing options...
fenway Posted August 6, 2008 Share Posted August 6, 2008 something like SELECT T1.UserID as UserID FROM `tblusers` as T1 WHERE T1.UserID !IN(SELECT UserID FROM `tbltopic`) Not really. You need to use a LEFT JOIN... IS NULL... but we'll need the table structure to be sure. Link to comment https://forums.phpfreaks.com/topic/118021-selecting-userid-that-is-not-in-other-table/#findComment-609194 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.