Reputation: 145
i have this part of an sql select:
where `zipCode` between "40000" and "42000"
OR `zipCode` between "50000" and "51000"
OR `zipCode` between "53000" and "60000"
AND plan = "sell"
AND created_at > '2017-01-01'
AND clone_id is not null
I'm getting the correct range of the zipCode back. But the condition with "plan" "ceated_at" and "clone_id" is not working.
Upvotes: 4
Views: 9704
Reputation: 452
Try this worked for me:
delete from table_name where column_name between '2018-06-01 09:00:00' and '2018-10-01 18:00:00';
Upvotes: 0
Reputation: 4192
Try below query :
where ( `zipCode` between "40000" and "42000" OR `zipCode` between "50000" and
"51000" OR `zipCode` between "53000" and "60000" )
AND plan = "sell" AND created_at > '2017-01-01' AND clone_id is not null
Upvotes: 8