Dereferences a locator, and returns the LOB referenced by that locator.
return_lob (datatype, locator_descriptor)
is the datatype of the LOB. Valid datatypes are:
text
unitext
image
is a valid representation of a LOB locator: a host variable, a local variable, or the literal binary value of a locator.
This example dereferences the locator and returns the LOB referenced by the literal locator value 0x9067ef4501000000001000000040100400800000000.
return_lob (text, locator_literal(text_locator, 0x9067ef4501000000001000000040100400800000000))
return_lob overrides the set send_locator on command, and always returns a LOB.
Any user can execute return_lob.
Commands deallocate locator, truncate lob
Transact-SQL functions locator_literal, locator_valid, create_locator