查看所有表名,查询结果加上字符
查询该实例下所有表名
USE [EmergencyCommand_FT]
GO
SELECT NAME FROM SYSOBJECTS WHERE TYPE='U'
拼上相关字符
SELECT 'truncate table ' +NAME +';' FROM SYSOBJECTS
WHERE TYPE='U'
and name not in ('Customer','Customer_CustomerRole_Mapping','CustomerRole','PermissionRecord','PermissionRecord_CustomerRole_Mapping')