在 KDB+ 中根据类型删除列

Delete column based on type in KDB+

我有一个 table,里面有一堆不同类型的列。我需要删除特定类型的所有列,但我不知道该怎么做。

我想要这样的东西:

delete from quotes where type = 11

但这行不通。有没有办法做到这一点?我还能够使用命令

列出相关列
select c from meta quotes where type="s"

但这给了我一栏 table 和栏标题,我不知道从那里去哪里。

可以使用功能性删除 (!)、删除 (#) 或删除 (_)

q)t:([] col1:`a`b`c;col2:1 2 3;col3:`x`y`z;col4:"foo")

q)![t;();0b;exec c from meta[t] where t="s"]
col2 col4
---------
1    f
2    o
3    o

q)(exec c from meta[t] where t<>"s")#t
col2 col4
---------
1    f
2    o
3    o

q)(exec c from meta[t] where t="s") _ t
col2 col4
---------
1    f
2    o
3    o