ets:delete/2
删除表里指定键的所有数据
用法:
delete(Tab, Key) -> true
删除表 Tab 里键为 Key 的所有数据。
TabId = ets:new(test_ets_new, [duplicate_bag, named_table]), ets:insert(TabId, [{a, 1}, {b, 2}, {a, 3}]), ets:delete(TabId, a).
TabId = ets:new(test_ets_new, [duplicate_bag, named_table]), ets:insert(TabId, [{a, 1}, {b, 2}, {a, 3}]), ets:delete(TabId, a), ets:tab2list(TabId).