On 12/11/2016 4:38 PM, Bart Smissaert wrote:
Say I have a UDF called AddOne in a statement like this:

update table1 set field1 = AddOne(field1)

and say the table table1 has some million rows.

Now I want to test this statement to test the UDF but I want to do this for
only one row.
How do I do this?

limit 1 only applies to data producing statements. Adding a where clause,
say where
rowid = 1 is a bit tricky (all this has to be done in code) and there may
not be a rowid of 1

where rowid = (select min(rowid) from table1);

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to