Click to copy
Tables • 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
.
Was this article helpful?