UPDATE MyTable SET NewCol = columnA
The Android DB API does not expose a mechanism for registering custom functions. You have to read all the
columnA
values, compute the hash in your code, and update the records one by one.
SQLite copy column values to a new column and/or with function
-
29-05-2022 - |
문제
This is SQLite for Android...
I am inserting a new column using ALTER TABLE tablename ADD COLUMN.
I have 2 questions:
Is there a way I can just copy values from existing columnA to this newly inserted/added columnB?
I need to add another columnC, the value of which is MD5 hash output of columnA. Is there a way SQLite can add columnC and set its value to MD5 hash (either using an existing SQLite internal function or my custom function)
해결책
제휴하지 않습니다 StackOverflow