3
SELECT id,x,y FROM `chars` WHERE `mapa`='1'

how can i exclude row when id='3'

Ghandhikus
  • 779
  • 2
  • 8
  • 12

2 Answers2

6
SELECT id,x,y FROM `chars` WHERE `mapa`='1' and id <> '3'

What is the data type of id though? If numeric you would want to use

SELECT id,x,y FROM `chars` WHERE `mapa`='1' and id <> 3

In MySQL you can also use != rather than <> but <> is ANSI and more portable.

Community
  • 1
  • 1
Martin Smith
  • 419,657
  • 83
  • 708
  • 800
3
SELECT id,x,y FROM `chars` WHERE `mapa`='1' AND `id`<>3
Tim Cooper
  • 151,519
  • 37
  • 317
  • 271