Re: [sqlite] How should I get the affected rows' ids

19 views
Skip to first unread message

Igor Tandetnik

unread,
Mar 26, 2012, 8:00:11 AM3/26/12
to sqlite...@sqlite.org
Wu Jian <ravi...@gmail.com> wrote:
> then I exec a SQL like this UPDATE this_table SET data='abc' WHERE id > 2.
>
> OK. We all know that row 3 and row 4 was updated by my SQL. But how should
> my program know that?

What does your program need to know that for? What do you plan to do with this information?

Would a trigger help? http://sqlite.org/lang_createtrigger.html
--
Igor Tandetnik

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

Kit

unread,
Mar 26, 2012, 8:16:53 AM3/26/12
to General Discussion of SQLite Database
UPDATE this_table SET data='abc' WHERE id > 2;
SELECT id FROM this_table WHERE id > 2;
--
Kit
Reply all
Reply to author
Forward
0 new messages