标签:
1、模式创建
mnesia:create_schema([node()|nodes()]).集群的节点之间创建模式
2、启动和停止
application:start(mnesia).
application:stop(mnesia).
3、创建表
rd(usr,{msisdn,id,status,plan,services}). usr
(om@publicGroup1)18> Fields = record_info(fields,usr).
[msisdn,id,status,plan,services]
(om@publicGroup1)19> mnesia:create_table(usr,[{disc_copies,[node()]},{ram_copies,nodes()},{type,set},{attributes,Fields},{index,[id]}]).
{atomic,ok}
标签:
原文地址:http://www.cnblogs.com/yanwei-wang/p/4649121.html