'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?



Solution 1:[1]

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!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Erick Ramirez