LIMIT 1
#8

Just like Vince said, it means it will only update the first row it finds.
I'll give an example using a picture:



Code:
UPDATE table_name SET Level = 500 WHERE Name = 'John' LIMIT 2
This will set the level of the first 2 to 500.

Code:
UPDATE table_name SET Level = 100 WHERE Name = 'John'
This will set the level of all of the rows that have John as name.
Reply


Messages In This Thread
LIMIT 1 - by Ugaustin - 11.06.2016, 10:53
Re: LIMIT 1 - by Vince - 11.06.2016, 10:56
Re: LIMIT 1 - by Ugaustin - 11.06.2016, 11:00
Re: LIMIT 1 - by SyS - 11.06.2016, 11:04
Re: LIMIT 1 - by Chilli9434 - 11.06.2016, 11:08
Re: LIMIT 1 - by Ugaustin - 11.06.2016, 11:13
Re: LIMIT 1 - by d1git - 11.06.2016, 11:22
Re: LIMIT 1 - by Stinged - 11.06.2016, 11:22

Forum Jump:


Users browsing this thread: 2 Guest(s)