NoSQL: Cassandra Batch to execute multiple Statements

In this post, I am sharing basic help to execute multiple statements using one single Cassandra batch.

Many times, it is required to execute multiple statements using single batch.
Cassandra CQL provides the BEGIN BATCH…APPLY BATCH command to execute multiple statements.

Below is a small demonstration:

Create Keyspace if not exists:

Use a Keyspace:

Create a Sample Table:

Insert few sample records:

Execute INSERT, UPDATE, DELETE using one Single Batch command:

Check the result:


Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from dbrnd.com

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz