Skip to content

Instantly share code, notes, and snippets.

@tzach
Created January 22, 2020 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tzach/91c7c9fd05d25c8ba82c0241e74f02dc to your computer and use it in GitHub Desktop.
Save tzach/91c7c9fd05d25c8ba82c0241e74f02dc to your computer and use it in GitHub Desktop.
CREATE KEYSPACE mykeyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
USE mykeyspace;
CREATE TABLE tbl (
k int,
v int,
x int,
PRIMARY KEY (k,v)
);
INSERT INTO tbl (k,v,x) VALUES (1,2,0);
INSERT INTO tbl (k,v,x) VALUES (1,2,3) IF NOT EXISTS;
INSERT INTO tbl (k,v,x) VALUES (1,3,3) IF NOT EXISTS;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment