Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OR operation in cassandra cqlsh

SELECT * FROM sample WHERE id = '2' OR uid = '1';

I got the error in cqlsh

Bad Request: line 1:36 missing EOF at 'OR'

Is It possible for or operator in Cassandra using cqlsh client?

like image 741
Hari Haran Avatar asked Nov 30 '25 08:11

Hari Haran


1 Answers

@Hari

OR operation is not supported by CQL. Only AND operation is supported, with some restrictions.

Anyway, CQL language looks similar to SQL but the semantics are very different. I suggest to have a look at the documentation for more details.

like image 169
doanduyhai Avatar answered Dec 03 '25 08:12

doanduyhai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!