【发布时间】:2021-10-01 12:52:54
【问题描述】:
如何从表中选择特定列值等于某值的所有行? 我尝试了以下方法:
select from tablname where columnvalue = value
谢谢
【问题讨论】:
标签: kdb
如何从表中选择特定列值等于某值的所有行? 我尝试了以下方法:
select from tablname where columnvalue = value
谢谢
【问题讨论】:
标签: kdb
你可以这样做:
q)table:([]a:1 2 3 4 5;b:`a`b`c`d`e;c:`hi`bye`bye`bye`hi)
q)table
a b c
-------
1 a hi
2 b bye
3 c bye
4 d bye
5 e hi
q)select from table where c=`bye
a b c
-------
2 b bye
3 c bye
4 d bye
【讨论】:
select from table where a =1
你可以这样做:
q)tbl:([] a:1 2 3;b:4 5 6;c:7 8 9)
q)tbl
a b c
-----
1 4 7
2 5 8
3 6 9
q)select a from tbl
a
-
1
2
3
【讨论】: