Posts: 918
Threads: 125
Joined: Nov 2010
When should I use LIMIT 1 in mysql?
Thanks.
Posts: 2,200
Threads: 14
Joined: Apr 2009
Reputation:
0
when you only want one result, usualy when getting the biggest/smallest value or something
Posts: 918
Threads: 125
Joined: Nov 2010
Okay, thanks, do you also know how to delete an user, which is stored in a table?
Posts: 146
Threads: 4
Joined: May 2007
Reputation:
0
I would strongly recommend putting "LIMIT 1" at the end of that statement. (If you only want to delete 1 row) I have deleted multiple rows by accident sometimes. Really annoying.