|
Pages: [1]
|
 |
|
Author
|
Topic: how to create the ID as auto-number? (Read 987 times)
|
newbie
Guest
|
Hi may I ask how to create the ID as auto-number when creating the table. Thank you
|
|
|
|
|
Logged
|
|
|
|
|
Ashley
|
Use 'next, as in: >> db-insert my-table [next 1-Jan-2000 "Note"] == [11 1-Jan-2000 "Note"]
Refer to the RebDB Guide for further information.
|
|
|
|
|
Logged
|
|
|
|
newbie
Guest
|
But how you create the datatype for your ID like
Code: db-create my-table [ID Name][integer! string!][3 12]
Is it something like that or wrong? cos if I try the next, it may have problem on it..
|
|
|
|
|
Logged
|
|
|
|
|
Ashley
|
Next, added in RebDB v1.2, is just a token used in lieu of an integer! value. Try the following code to see how it works: db-create test [id][integer!][1] db-insert test [next] db-insert test [next] db-select * test
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |