Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Modifying User-defined Type Variable and Parameter Values

You can modify variables and parameters of a user-defined type in a SET statement or in the SELECT list of a SELECT statement. In either case, you modify values either by setting an individual property of the user-defined type value, or by invoking a state-modifying method on the instance of the type. To do this, you must have EXECUTE permission on the type.

This example sets a value for a user-defined type point by modifying the value of the type's property X.

DECLARE @p Point
SET @p.X = @p.X + 1.1
SELECT @p
GO

To modify a user-defined type variable or parameter value

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.