LorenzoR Posted April 5, 2006 Share Posted April 5, 2006 What´s wrong with this query?SELECT users_nick FROM users WHERE NOT EXISTS (SELECT users_nick FROM users WHERE users_nick = "admin");It gives me this message error: "ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXISTS (SELECT users_nick FROM users WHERE users_nick = "admin" Link to comment Share on other sites More sharing options...
aspnetguy Posted April 5, 2006 Share Posted April 5, 2006 Why not just do this SELECT users_nickFROM usersWHERE users_nick != 'admin' Link to comment Share on other sites More sharing options...
LorenzoR Posted April 5, 2006 Author Share Posted April 5, 2006 Why not just do thisSELECT users_nickFROM usersWHERE users_nick != 'admin' <{POST_SNAPBACK}> I just put an example because any query that uses EXISTS doesn´t work.The one I am doing is more complicated. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now