mirror of
https://github.com/beekeeper-studio/beekeeper-studio.git
synced 2026-03-13 10:12:54 +08:00
17 lines
501 B
SQL
17 lines
501 B
SQL
-- Create a keyspace
|
|
CREATE KEYSPACE IF NOT EXISTS store WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : '1' };
|
|
|
|
CREATE TABLE store.shopping_cart (
|
|
userid text PRIMARY KEY,
|
|
item_count int,
|
|
last_update_timestamp timestamp
|
|
);
|
|
|
|
-- Insert some data
|
|
INSERT INTO store.shopping_cart
|
|
(userid, item_count, last_update_timestamp)
|
|
VALUES ('9876', 2, toTimeStamp(now()));
|
|
INSERT INTO store.shopping_cart
|
|
(userid, item_count, last_update_timestamp)
|
|
VALUES ('1234', 5, toTimeStamp(now()));
|