Search code examples
google-cloud-platformgoogle-cloud-spanner

Does Replace() remove child table rows?


I'm using the replace operation, because -- if a row already exists -- I want non-specified values to be set to NULL. If the table whose rows I am replacing has child tables, will corresponding child table rows be deleted?


Solution

  • Yes.

    You can think of a replace as a delete of the specified rows -- plus all nested child table rows -- followed by an insert of a new row.