1. Determine if the table name exists:
SELECT * FROM Sqlite_master
The table structure of the Sqlite_master is as follows:
Type |name |tbl_name |rootpage |sql
Model query results;
=============
Type>>table
Name>>android_metadata
Tbl_name>>android_metadata
Rootpage>>3
Sql>>create TABLE android_metadata (locale TEXT)
=============
Type>>table
Name>>talkvo
Tbl_name>>talkvo
Rootpage>>4
Sql>>create TABLE talkvo (content text,videopath text,img text,name text,issend blob,isplaying Integer , _id integer PRIMARY KEY)
2. Determine whether the field exists
PRAGMA Table_info ([Talkvo])
Must be capitalized, structured as follows:
CID | name | Type | Notnull | Dflt_value | Pk
Model query results;
PRAGMA Table_info ([Talkvo])
=============
Cid>>0
Name>>content
Type>>text
Notnull>>0
Dflt_value>>null
Pk>>0
=============
Cid>>1
1name>>videopath
Type>>text
Notnull>>0
Dflt_value>>null
Pk>>0
=============
Cid>>2
Name>>img
Type>>text
Notnull>>0
Dflt_value>>null
Pk>>0
=============
Cid>>3
Name>>name
Type>>text
Notnull>>0
Dflt_value>>null
Pk>>0
=============
Cid>>4
Name>>issend
Type>>blob
Notnull>>0
Dflt_value>>null
Pk>>0
=============
Cid>>5
Name>>isplaying
Type>>integer
Notnull>>0
Dflt_value>>null
Pk>>0
=============
Cid>>6
Name>>uid
Type>>integer
Notnull>>0
Dflt_value>>null
Pk>>0
=============
Cid>>7
name>>_id
Type>>integer
Notnull>>0
Dflt_value>>null
Pk>>1