How to execute an SQL statement using mDb.update?

The statement is as follows:

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

Now I call him mDb.execSQL. How to do the same with mDb.update? (you need to see how many records have been updated)

Update : just for an example. Here is my database before upgrading:

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

this is what i should get after upgrade

item  close_time_2  open_time_2  displayed_value
1     02:40         04:50        02:40-04:50
2     02:15         02:45        02:15-02:45
3                   05:15
0
source share
1 answer

It’s actually not so difficult to learn how to use the method update. See Documents and this Example Code .

0
source

All Articles