Newly inserted data can be a single inserted_data constant, table name, column name, or text pointer.
|
Update action
|
UPDATETEXT parameters
|
|---|
|
To replace existing data
|
Specify a nonnull insert_offset value, a nonzero delete_length value, and the new data to be inserted.
|
|
To delete existing data
|
Specify a nonnull insert_offset value and a nonzero delete_length. Do not specify new data to be inserted.
|
|
To insert new data
|
Specify the insert_offset value, a delete_length of 0, and the new data to be inserted.
|
For best performance we recommend that text, ntext and image data be inserted or updated in chunks sizes that are multiples of 8,040 bytes.
In SQL Server, in-row text pointers to text, ntext, or image data may exist but may not be valid. For information about the text in row option, see sp_tableoption (Transact-SQL). For information about invalidating text pointers, see sp_invalidate_textptr (Transact-SQL).
To initialize text columns to NULL, use UPDATETEXT when the compatibility level is equal to 65. If the compatibility level is equal to 70, use WRITETEXT to initialize text columns to NULL; otherwise, UPDATETEXT initializes text columns to an empty string. For information about setting the compatibility level, see sp_dbcmptlevel (Transact-SQL).