开发者

How to execute the SQL statement with mDb.update?

The statement is the following:

UPDATE mytable SET displayed_value=(close_time_2 || '-' || open_time_2)
WHERE close_time_2 != ""

Now I call it with mDb.execSQL. How to execute the same with mDb.update? (need to see how many records were updated)

Update: just to give an example. Here is my database before update:

item  close_time_2  open_time_2  displayed_value
1     02:40         04:50
2     02:15         02:45
3                   05:15

here is what I should get after update

item  close_time_2  open_time_2  displayed_value
1     02:40         04:50  开发者_Go百科      02:40-04:50
2     02:15         02:45        02:15-02:45
3                   05:15


It's really not that hard to find out how to use the update-method. See the Docs and this Sample-code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜