Mohit Deshpande
Mohit Deshpande

Reputation: 55257

Sqlite different column names, but with same values

Here is my current SQLite table:

CREATE TABLE formula (_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?

Upvotes: 0

Views: 1193

Answers (1)

Squonk
Squonk

Reputation: 48871

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

Upvotes: 1

Related Questions