SQL query with "not exists" not working
I'm trying to use a simple query but I'm not getting anywhere. The
objective is to "learn" how "not exists" works. I have a simple table with
"idUsuario" as default ID for users and a name.
SELECT * FROM usuario
WHERE NOT EXISTS (
SELECT * FROM usuario
WHERE u.idUsuario =16
)
Here i'm trying to get ALL the users from the table where the ID IS NOT
16. But it just get all of them.. What am I doing wrong?
Thanks in advance!
No comments:
Post a Comment