Cassandra – Insert Data

Insert command allows us to creat or insert the data records into the columns. Here it is not required to define all columns and all those missing columns will get no space on disk.So if columns Exists, it is updated.


INSERT INTO keyspace_name.table_name
( column_name, column_name...)
VALUES ( value, value ... )
USING option AND option


INSERT INTO users (user_id, first_name, last_name, email)
VALUES('1002', 'cassandra', 'julie', '');

Validate the data:

Cqlsh> select * from users;