7-Views
  • Mysql
  • WordPress
  • HTML

MySQL - UPDATE query with LIMIT - 7-Views

MySQL – UPDATE query with LIMIT

Posted by Neha Sharma
July 24, 2019

Many a times there are certain conditions where ou want to update your records with certain limit attached to it.

To update multiple rows using limit in MySQL can be implement by a query:

UPDATE table_name SET field='1' WHERE id IN (SELECT id FROM (SELECT id FROM table_name LIMIT 0, 10) tmp);

 

Share on FacebookShare on TwitterShare on LinkedinShare on Reddit

read more

  • limit
  • mysql
  • update
94 Comments
 
 
Recent Posts
  • How to ignore TypeScript errors with @ts-ignore?
  • Disable ONLY_FULL_GROUP_BY
  • How to install PhpStorm On Ubuntu
  • How to Configure SMTP using MailHog in Laravel using Homestead
  • Check For Foreign Key Constraint Violation In Laravel
Tags
add_theme_support admin bar hide aws creating widget dns featured image featured image wordpress https issue https with load balancer laravel login logout mysql nginx query server show_admin_bar tags update wordpress Wordpress widget
Categories
  • Angular
  • AWS
  • Bootstrap
  • Cloud
  • CodeIgniter
  • File System
  • General
  • geocoder
  • htaccess
  • HTML
  • Javascript
  • Jquery
  • Laravel
  • Mysql
  • PHP
  • TypeScript
  • Ubuntu
  • Wordpress
© 2018 7-Views