• 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/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/