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.
Syntax:
INSERT INTO keyspace_name.table_name ( column_name, column_name...) VALUES ( value, value ... ) USING option AND option
Example:
INSERT INTO users (user_id, first_name, last_name, email) VALUES('1002', 'cassandra', 'julie', 'julie@email.com');
Validate the data:
Cqlsh> select * from users;