Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- q)tab:([]col1:`a`b`c;col2:1 2 3)
- q)select i,col1,col2 from tab
- x col1 col2
- -----------
- 0 a 1
- 1 b 2
- 2 c 3
- q)
- q)exec i from tab where col1=`b
- ,1
- q)tab2:([] index:2 3;col3:"yz")
- q)
- q)tab2
- index col3
- ----------
- 2 y
- 3 z
- q)(select index:i,col1,col2 from tab) lj 1!tab2
- index col1 col2 col3
- --------------------
- 0 a 1
- 1 b 2
- 2 c 3 y
- t:([] id:1 2 3)
- select from t where i=1
- output--> id:2
- t:delete from t where i=1
- select from t where i=1
- output--> id:3
Add Comment
Please, Sign In to add comment