Select all rows in a table But except one in in that table?

You have a few options:

SELECT * FROM table WHERE id != 4;

SELECT * FROM table WHERE NOT id = 4;

SELECT * FROM table WHERE id <> 4;

Also, considering perhaps sometime in the future you may want to add/remove id’s to this list, perhaps another table listing id’s which you don’t want selectable would be a good idea.

In which case you would have:

SELECT * FROM table
WHERE id NOT IN (SELECT id FROM exempt_items_table);

Source:-  http://stackoverflow.com/users/263467/tim