Update MySQL where id in range and use md5

In MySQL sometimes we need to update a set of rows within the specific range of ids. If the range is short then we can use the ID IN (ids) argument. If it's long and we know that range, let's use the BETWEEN value AND value argument.

UPDATE `table` SET `password` = (SELECT MD5(uniqueName)) WHERE `id` BETWEEN 863 AND 987

Home   Our knowledge base   Sitemap   Contact           Terms of Service   Privacy Policy   Usage Policy           © 2002-2014, All rights reserved, Atlantic Silicon Inc.