Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Mathias Rangel Wulff edited this pageJun 12, 2015 ·4 revisions

KeywordIDENTITY,AUTO_INCREMENT,AUTOINCREMENT

Syntax:

CREATETABLEtableid (        columnid typeid IDENTITY [(start [, step])]    );

AlaSQL supports autoincrement feature:

alasql('CREATE TABLE one (a INT AUTO_INCREMENT, b STRING)');alasql('INSERT INTO one (b) VALUES ("one"), ("two")');varres=alasql('SELECT * FROM one');// returns [{"a":1,"b":"one"},{"a":2,"b":"two"}]

Try this examplein jsFiddle

By default AlaSQL the initial value is 1 and th step is 1, but you can change it:

alasql('CREATE TABLE one (a INT IDENTITY(10,5), b STRING)');

See also:DEFAULT

© 2014-2026,Andrey Gershun &Mathias Rangel Wulff

Please help improve the documentation by opening a PR on thewiki repo

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp