Click to copy

• Reviewed for ksqlDB 0.29

How to Update Row of Table in ksqlDB

UPDATE statements don’t exist in ksqlDB.

Instead, run an INSERT statement where you set the PRIMARY KEY values to the record you want to update, and set the rest of the fields to the new values you want to update.

Example of statement updating the score to 4 for the student_id=1.

INSERT INTO scores_table (
  student_id,
  name,
  score
) VALUES (
  1,
  'Alice',
  4
);

In the scores_table, the student_id is the PRIMARY KEY.

Discover what readers are saying
topictale
Get easy to digest how-tos on ksqlDB
Sign up
Please read our Privacy Policy to understand how we protect and manage your data.
You may also like