SQL Flow Field Guide

UPDATETEXT

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

in-place LOB edit (deprecated)

What changes

Input
source text or pointer
Output or change
part of a text/ntext/image column

Syntax at a glance

UPDATETEXT [BULK] { table_name.dest_column_name dest_text_ptr } { NULL | insert_offset } { NULL | delete_length } [ WITH LOG ] [ inserted_data | { table_name.src_column_name src_text_ptr } ]

Work example

A legacy module edits part of a text or image value through a text pointer.

Do not use this for new work. Reproduce the exact byte and offset behavior in a disposable test before replacing it with supported large-value methods.

Check your work UPDATETEXT. The migration preserves length, offset, and null behavior. The legacy statement is not copied into new code.

Open Microsoft Learn for full syntax, permissions, and details for your version.