user1535147
user1535147

Reputation: 1475

How do I return to the cqlsh prompt if I make a mistake?

Whenever i make a mistake in the query, cassandra cqlsh will show the error below.

> use TESTDB 
. 
. 
. 
. 
. 
Statements are terminated with a ';'.  You can press CTRL-C to cancel an incomplete statement.

Pressing CTRL-C will bring me back to the Windows shell. I dont want to always exit CQLSH just because of syntax error. What can I do?

Upvotes: 0

Views: 472

Answers (1)

Erick Ramirez
Erick Ramirez

Reputation: 16423

CQL statements need to be terminated with a semi-colon (;).

All you need to do is type in ; then hit <Enter> to get the cqlsh prompt back. Even if your CQL statement is incorrect, cqlsh will just report an error and give you back the prompt. Cheers!

Upvotes: 1

Related Questions