Valid characters in names
Only alpha-numeric characters and underscores are allowed in keyspace and table names. Keyspace and table names must begin with an alphabetic charcter. All other element names, such as columns or types support any characters.
To specify a name that contains a special character, like period (.) or hyphen (-), enclose the name in double quotes.
Creations that Work | Creations that Don’t Work |
---|---|
CREATE TABLE foo … |
CREATE TABLE foo!$% … |
CREATE TABLE foo_bar … |
CREATE TABLE foo[]"90 … |
CREATE TABLE foo ("what#*&" text, …) |
CREATE TABLE foo (what#*& text, …) |
ALTER TABLE foo5 … |
ALTER TABLE "foo5$$"… |
CREATE FUNCTION "foo5$$$^%" … |
CREATE FUNCTION foo5$$… |
CREATE AGGREGATE "foo5!@#" … |
CREATE AGGREGATE foo5$$ |
CREATE TYPE foo5 ("bar#9" text, … |
CREATE TYPE foo5 (bar#9 text … |