Home Forums Article Discussions Article Discussions by Author Discuss content posted by Roi Assa Things You Didn't Know About Temp Tables and Table Variables RE: Things You Didn't Know About Temp Tables and Table Variables
Christian Buettner-167247
SSChampion
Points: 13729
More actions
July 17, 2008 at 1:49 am
#844194
Hello Roi,
you actually can add constraints to table variables.
Example:
DECLARE @MyTabVar TABLE(
PKCol int NOT NULL PRIMARY KEY CLUSTERED
,UniqueCol int NOT NULL UNIQUE
)
Best Regards,
Chris Büttner