3
我有一個TABLE
這樣的:CQL:比較兩個列的值
id | expected | current
------+----------+--------
123 | 25 | 15
234 | 26 | 26
345 | 37 | 37
現在我想選擇所有ids
其中current
等於expected
。在SQL中,我會這樣做:
SELECT id FROM myTable WHERE current = expected;
但是在CQL中它似乎無效。我cqlsh
返回此信息:
no viable alternative at input 'current'
是否有有效的CQL查詢來實現此目的?
編輯 按照定製列表,文檔應該工作,但它不...這就是醫生說:
<selectWhereClause> ::= <relation> ("AND" <relation>)*
| <term> "IN" "(" <term> ("," <term>)* ")"
<relation> ::= <term> <relationOperator> <term>
<relationOperator> ::= "=" | "<" | ">" | "<=" | ">="
<term> ::= "KEY"
| <identifier>
| <stringLiteral>
| <integer>
| <float>
| <uuid>
;