1、 if exists table a drop a;
2、 select top 1 * from (select max(户名),sum(小计),max(委托户名) from a group by 委托户名) where 委托户名 in (select distinct 委托户名 from a)
1、if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[RS_WageItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[RS_WageItem]