Search code examples
cassandracqlcqlsh

CQL Cassandra Where clause


The following query (cqlsh cassandra)

SELECT * from keyspace.dialogs WHERE sid = 
"07323067ef605ffdb4fa" ;

gives me this error

SyntaxException: line 1:92 no viable alternative at input ';' 
(...keyspace.dialogs WHERE sid = 
["07323067ef605ffdb4fa" ;)

The sid key is correct, and the data should be there, is the syntax different with cqlsh ?


Solution

  • Use singlequote for txt:

    SELECT * from keyspace.dialogs WHERE sid = '07323067ef605ffdb4fa' ;