Update only 20 rows
604058Jul 22 2008 — edited Jul 23 2008I only want to update the first 20 rows in a table that match a certain condition. Here is the sql I have which is not working:
UPDATE random_numbers (SELECT ROWNUM, randomnum, flag FROM random_numbers where flag='N') SET flag = 'P' WHERE rownum < 2;
Here's the error I get:
ORA-00971: missing SET keyword
Any suggestions?