WRITETEXT
WRITETEXT is a SQL command used to directly modify the text, ntext, or image data type column of a specific row in a table without using a SELECT statement. It effectively overwrites existing data. WRITETEXT is particularly helpful in managing large objects (LOBs) due to its ability to provide direct access to these types of data.
Example
Output
Explanation
In this example, WRITETEXT
is used to update a specific Text
column in the Document
table. The Text column’s value for the row where the Title
is ‘title1’; is changed to ‘NEW TEXT’.