I am trying to show all user information held in a db.
SELECT * FROM member
However i do not want it to select the current user (find by personID)
Is there a way to say select all but not personID XXXX?
Thanks
I am trying to show all user information held in a db.
SELECT * FROM member
However i do not want it to select the current user (find by personID)
Is there a way to say select all but not personID XXXX?
Thanks
Use <>
or !=
as an not equal to operator.
SELECT * FROM member WHERE personID <> 123;
SELECT * FROM member WHERE personID != 123;
If you want to exclude multiple IDs:
SELECT * FROM member WHERE personID NOT IN (1,2,3);