Well, it's not so unsuitable. For luck, a simple replacement could solve
the problem. I asked only because I thought there was a pattern. If not,
let's go to the replacements!
Em 15/11/2011 10:15, Simon Slavin escreveu:
On 15 Nov 2011, at 11:27am, Luciano de Souza wrote:
With the clause "integer primary key", we can create an autoincrementable
field in Sqlite. Other databases uses auto_increment, serial and something else.
If I am not wrong, Sqlite uses also auto_int. But, if I would build a database
readable by other databases, what is the best way to create an
autoincrementable field?
Unfortunately for you, there is no part of the SQL specification which defines
how to define a column as an autoincrementable field. Each company is free to
do it however it wishes: SQLite spells a word 'AUTOINCREMENT' and MySQL spells
it 'AUTO_INCREMENT', one standard uses the text 'GENERATED BY DEFAULT AS
IDENTITY' but almost no engines support that exact phrase.
So unfortunately this is one of the parts of SQL which you have to do
differently depending on which SQL engine you use.
Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
--
Luciano de Souza
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users