i have table in SQLite named TBL_data
i have two fields id and name
All id is set to the -1
i want to update first occurrence of record
for t
That query works only if you have compiled SQLite with SQLITE_ENABLE_UPDATE_DELETE_LIMIT.
SQLITE_ENABLE_UPDATE_DELETE_LIMIT
If this is not the case, you have to use some unique key of your table to determine the rows:
UPDATE tbl_data SET ... WHERE rowid IN (SELECT rowid FROM tbl_data WHERE ... ORDER BY ... LIMIT 1)