set @InsertStr='INSERT INTO [dbo].[T_SchoolPercentMonth]([SchoolID],[MonthOfYear],[PercentNum]) VALUES('''+cast(@SchoolID as nvarchar)+''','''+convert(char(7),getdate(),20) +''','+cast(@PercentNum as nvarchar)+')'; 引用字符 加一对单引号. 'select * from tb wher…