1. 程式人生 > >android 資料庫的操作

android 資料庫的操作

開啟資料庫:

sqlite3 /data/data/com.android.providers.settings/databases/settings.db


資料庫的操作(增刪改查)

增加:

INSERT INTO system VALUES(99,'http_proxy','10.193.xx.xx:1080') ;

刪除:

DELETE FROM system WHERE _id=99;

更改:

UPDATE system SET value = '30000' WHERE name = 'screen_off_timeout' ;

查詢:
SELECT * FROM system WHERE name = 'screen_off_timeout' ;