CREATE KEYSPACE
The statement creates a keyspace
that functions as a grouping mechanism for database objects (such as tables or ).
create_keyspace
keyspace_properties
Grammar
keyspace_name
andproperty_name
are identifiers.property_value
is a literal of either , text, or datatype.
- CQL keyspace properties are supported in the syntax but have no effect internally (where Yugabyte defaults are used instead).
cqlsh> CREATE KEYSPACE example;
example system_schema system_auth system
CREATE KEYSPACE example WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND DURABLE_WRITES = true;
^^^^^^