mysql - will limit work same for both condition in select and delete statement -



mysql - will limit work same for both condition in select and delete statement -

i have pick unused items table, move items other info used table called useditems. while items moved have delete items unused table.

so have write downwards next query .

insert used select knumber unused limit 1000; delete unused limit 1000;

my concern point pick same record not using order in query , in table have single column . inserted records deleted.

i new mysql .

instead utilize order by clause limit clause create sure same picking of records , limit out order won't create much sense cause limit may end inserting/deleting different set off info whereas goal delete same set of info inserting.

insert used select knumber unused order knumber limit 1000; delete unused order knumber limit 1000;

mysql sql

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -