-2

how to delete mysql row from id 9809 to id 17275?

sql =" DELETE from Table WHERE id = 9809 to id= 17275"

how to delete from the start id to the end id?

Masivuye Cokile
  • 4,729
  • 3
  • 18
  • 34

3 Answers3

3

if you want delete a range of numeric values you could use between

  sql =" DELETE from Table WHERE id between  9809 and  17275"
ScaisEdge
  • 129,293
  • 10
  • 87
  • 97
1

it must be

$sql = " DELETE from Table WHERE id between 9809 and 17275"
Haseeb A
  • 4,002
  • 1
  • 32
  • 30
0
DELETE from Table WHERE cast(id as unsigned) >= 9809 and  cast(id as unsigned)<=17275;
Mahesh K S
  • 639
  • 1
  • 6
  • 13