-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,754
  • 3
  • 19
  • 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
  • 131,976
  • 10
  • 91
  • 107
1

it must be

$sql = " DELETE from Table WHERE id between 9809 and 17275"
Haseeb A
  • 5,356
  • 1
  • 30
  • 34
0
DELETE from Table WHERE cast(id as unsigned) >= 9809 and  cast(id as unsigned)<=17275;
Mahesh K S
  • 719
  • 1
  • 7
  • 15