Apache Cassandra 1.0 Documentation

USE

This document corresponds to an earlier product version. Make sure you are using the version that corresponds to your version.

Latest Cassandra documentation | Earlier Cassandra documentation

Connects the current client session to a keyspace.

Synopsis

USE <keyspace_name>;

Description

A USE statement tells the current client session and the connected Cassandra instance which keyspace you will be working in. All subsequent operations on column families and indexes are in the context of the named keyspace, unless otherwise specified or until the client connection is terminated or another USE statement is issued.

Example

USE PortfolioDemo;