How to switch Keyspace in Cassandra using CQL?

Pankaj picture Pankaj · Jan 4, 2017 · Viewed 22.8k times · Source

I used USE billKeyspace; to enter a keyspace and start using it. Now I want to exit this keyspace and enter another keyspace. How to do that?

If I use exit; or quit; it exits out of cql session itself and then I have to connect again.

Answer

Pankaj picture Pankaj · Jan 4, 2017

To switch keyspaces I didn't find any other way but to use USE otherKeySpace;.