I have a table with pennames in them, and this database is going to be used by multiple sites, but I only want to grab the pennameID and title from a specific site, but I don't want to grab the site value.
This is what I came up with:
It's not working, general syntax error at WHERE EXISTS
Any suggestions?
This is what I came up with:
Code:
SELECT pennameID, title,
FROM pen_names AS t1
WHERE EXISTS (
SELECT t2.site
FROM pen_names AS t2
WHERE t2.site = 'prnewsy'
OR t2.site = 'all'
}
It's not working, general syntax error at WHERE EXISTS
Any suggestions?