|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Monday, November 26, 2012 5:36 PM
Points: 869,
Visits: 96
|
|
| Good Question. Table variables do not honor transaction, but are valid. This option caught me off guard.
|
|
|
|
|
Ten 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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, December 11, 2012 12:43 PM
Points: 4,
Visits: 16
|
|
| Table variables can be truncated.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:21 AM
Points: 5,244,
Visits: 7,062
|
|
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
|
|
|
|
|
Forum 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.
|
|
|
|