TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

Cassandra Batch

Cassandra Batch for beginners and professionals with topics on architecture, relational vs no sql database, data model, cql, cqlsh, keyspace operations, table operations, installation, collections etc.

<< Back to CASSANDRA

Cassandra Batch

In Cassandra BATCH is used to execute multiple modification statements (insert, update, delete) simultaneously. It is very useful when you have to update some column as well as delete some of the existing.

Syntax:

BEGIN BATCH
<insert-stmt>/ <update-stmt>/ <delete-stmt>
APPLY BATCH 

Example:

Let's take an example to demonstrate BATCH command. Here, we have a table named "student" with columns (student_id, student_fees student_name,), having the following data.

Cassandra Batch 1

In this example, we will perform the BATCH (Insert, Update and Delete) operations:

  • Insert a new row with the following details (4, 4000, Sonoo).
  • Update the student_fees of student with row id 3 to 8000.
  • Delete student_fees of the employee with row id 2.
Cassandra Batch 2

Now the BATCH is applied. You can verify it by using SELECT command.

Cassandra Batch 3

Here, you can see that the table is completely modified by the above commands.


Next TopicCQL create data




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf