B4J Question [BANano] For BANanoSQL, is there something like "rowid" for SELECT?

Mashiane

Expert
Licensed User
Longtime User
With SQLite for example, well not sure if BANanoSQL does it, if you dont specify an auto-increment field explicitly, it creates a rowid, or rather the better wording, without specifying 'WITHOUT ROWID'

For example

B4X:
CREATE TABLE people (   first_name TEXT NOT NULL,   last_name TEXT NOT NULL );

Then insert

B4X:
INSERT INTO people (first_name, last_name) VALUES('Anele', 'Mbanga');

Then select

B4X:
SELECT   rowid,   first_name,   last_name FROM   people;

Ohh, now I see I was not thinking, it now makes sense, whatever field you define as a primary auto-increment, it is just an alias to rowid. :rolleyes:
 
Upvote 0
Top