Ledger Nano X - The secure hardware wallet
SHARE
TWEET

ets select

krot Nov 1st, 2019 185 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -record(user,{id,name,age::integer}).
  2.  
  3.  
  4. s()->
  5. T = ets:new(table1,[]),
  6. ets:insert(T,{1,#user{id=1,name="123",age=10}}),
  7. ets:insert(T,{2,#user{id=2,name="23",age=776}}),
  8. ets:insert(T,{3,#user{id=3,name="gfg",age=12}}),
  9. ets:insert(T,{4,#user{id=4,name="12hghf3",age=34}}),
  10. ets:insert(T,{5,#user{id=5,name="hgjgh",age=554}}),
  11. ets:insert(T,{6,#user{id=6,name="hg",age=35}}),
  12.  
  13. ets:select(T,[{{'_',#user{
  14.                     id='$1',
  15.                     name="23",
  16.                     age='$2'}},
  17.                 [],
  18.                 [ {{'$2','$1' }}  ]}])  
  19.  .
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top