Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Table Variables Expand / Collapse
Author
Message
Posted Tuesday, June 17, 2008 6:17 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, July 1, 2013 4:39 PM
Points: 889, Visits: 97
Good Question. Table variables do not honor transaction, but are valid. This option caught me off guard.
Post #518668
Posted Thursday, July 3, 2008 4:56 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, December 29, 2008 4:12 AM
Points: 1,363, Visits: 131
hi i performed truncate table in sql server 2005 & i was successful but it just throws an alert not an error as u have mentioned
Post #527914
Posted Friday, August 27, 2010 3:28 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, December 11, 2012 12:43 PM
Points: 4, Visits: 16
Table variables can be truncated.
Post #976797
Posted Friday, August 27, 2010 4:03 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:18 PM
Points: 6,048, Visits: 8,330
cwcridindirty (8/27/2010)
Table variables can be truncated.

Are you sure?
DECLARE @Vendors TABLE
(VendorPK int,
VendorName varchar(50),
VendorStatus char(1));

TRUNCATE TABLE @Vendors;

Msg 102, Level 15, State 1, Line 6
Incorrect syntax near '@Vendors'.



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #976816
Posted Friday, August 27, 2010 6:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, December 11, 2012 12:43 PM
Points: 4, Visits: 16
You're right. At first, I was too focused and thought this was in reference to regular variables assigned with a Table name, not actual Table Variables.
Post #976853
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse