Sqlite different column names, but with same values
Here is my current SQLite table:
CREATE TABLE formula开发者_StackOverflow (_id INTEGER PRIMARY KEY AUTOINCREMENT,suggest_text_1 TEXT,formula TEXT,category TEXT);
I want to integrate search suggestions in an Android app, but I need a SUGGEST_COLUMN_INTENT_DATA_ID
and I want my _id
to represent it. But I also need a _id
for the content provider. So is there a way where I could have SUGGEST_COLUMN_INTENT_DATA_ID
and store the current and future values of _id
in it? Would I use an alias?
Would I use an alias?
This is possible but it depends on your exact requirements. See my answer to this question to see if this applies to you. Android: column '_id' does not exist problem
精彩评论