UPDATE Query without WHERE Clause

前端 未结 2 714
無奈伤痛
無奈伤痛 2021-01-17 08:53

I know it sounds to be a stupid question but i was wondering if the update query can be used without a where clause. And if so in what conditions.<

相关标签:
2条回答
  • 2021-01-17 09:06

    So, I think when you want to update the whole field for some kind of reasons like updating the status of users enrollment to free for all users.

    UPDATE users SET status = "free";
    
    0 讨论(0)
  • 2021-01-17 09:21

    if you don't use the WHERE clause all the records on the table will be affected

    0 讨论(0)
提交回复
热议问题