For the 1st one you may do:
q)`abc,/:(3#2)?:`8
abc jognjhck cihanjhp
abc hkpblald aeajbddp
abc blmjhgah ooeiogdj
For 2nd one you may treat the table as a dictionary:
q)tb
row1 row2
---------
1 3
2 4
q)(tb`id): 5 6
q)tb
row1 row2 id
------------
1 3 5
2 4 6
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…