[erlang-questions] Mnesia create a table with a auto increase id?
Tue Mar 17 09:50:04 CET 2009
To auto increased uid you could use:
2009/3/17 fei wang <fei@REDACTED>:
> I am now using mnesia database, and I have a user table with record
> Problem one is if a username is already in the table, it would not be
> inserted into the table. Should I first query the table to see if there is a
> same name in it? Any other good methods?
> Problem tow is the uid should be auto increased each insert time, I have no
> idea about this... Should I change the type of table to ordered-set, and
> query the last record's uid value, increase it by myself?
> If anyone have some good idea, or something about mnesia which I don't know,
> please tell me, thanks.
> erlang-questions mailing list
More information about the erlang-questions