WRITETEXT
overwrites a LOB by text pointer (deprecated)
What changes
- Input
- data value
- Output or change
- whole text/ntext/image column value
Syntax at a glance
WRITETEXT [BULK] { table.column text_ptr } [ WITH LOG ] { data }
Work example
A legacy module writes a text or image value through a text pointer.
Do not add new uses. Capture the current value boundaries and test a supported replacement against the same synthetic input.
Check your work WRITETEXT. The replacement writes the expected bytes and handles an empty value. No new WRITETEXT call remains.
Open Microsoft Learn for full syntax, permissions, and details for your version.