Pramod,
You do need autoincrement - but it you also need to mark the column as
the primary key. Sorry about the confusion:
CREATE TABLE room (
_id INTEGER PRIMARY KEY AUTOINCREMENT
room_name TEXT )
CREATE TABLE equipment_in_room (
_id INTEGER PR
> You don't need 'autoincrement', I think it's for MS SQL Server.
>
> Just don't specify a value for the primary key when inserting, and a new
> unique value will be generated for you. It is then returned by insert() to
> your code, so you can use it in the 'many' table.
Actually I didn't get you.
You don't need 'autoincrement', I think it's for MS SQL Server.
Just don't specify a value for the primary key when inserting, and a new
unique value will be generated for you. It is then returned by insert() to
your code, so you can use it in the 'many' table.
--
Kostya Vasilyev -- http://kmanso
Hi, Bibek
But when I write a command for foreign key then it doesn't give me
any error. And I didn't find any doc which say that foreign key is not
supported in android database.
But when i add autoincrement for foreign key then it gives me error.
My query is
sampleDB.execSQL("CREATE TABLE IF
4 matches
Mail list logo