Skip to main content
added 10 characters in body; edited tags; edited title
Source Link
paxdiablo
  • 888.4k
  • 243
  • 1.6k
  • 2k

Select all rows except based on two fields in MySQL

SELECT * FROM table WHERE id != 4;
 
SELECT * FROM table WHERE NOT id = 4;
 
SELECT * FROM table WHERE id <> 4;

I've got this all working but I also have to choose another field or(or more field notfields) to selectdecide what rows are returned.

howHow can I get this working?

Select all rows except two fields in MySQL

SELECT * FROM table WHERE id != 4;
 
SELECT * FROM table WHERE NOT id = 4;
 
SELECT * FROM table WHERE id <> 4;

I've got this all working but I also have to choose another field or more field not to select.

how can I get this working?

Select all rows except based on two fields in MySQL

SELECT * FROM table WHERE id != 4;
SELECT * FROM table WHERE NOT id = 4;
SELECT * FROM table WHERE id <> 4;

I've got this all working but I also have to choose another field (or more fields) to decide what rows are returned.

How can I get this working?

Source Link
woninana
  • 3.5k
  • 11
  • 45
  • 69

Select all rows except two fields in MySQL

SELECT * FROM table WHERE id != 4;

SELECT * FROM table WHERE NOT id = 4;

SELECT * FROM table WHERE id <> 4;

I've got this all working but I also have to choose another field or more field not to select.

how can I get this working?