1.top 100 选取表中前100条改为 limit #{limit},limit 为变量2.获取当前日期getdate()改为now()3.id=#{id,jdbcType=BIGINT}改为id=#{id},不需要指定数据类型4.sqlserver查询需要nolock而mysql不需要5.字符串拼接sqlserver:select * from A where contract_no like '%'+'DSP'+'%' order by id descmysql:select * fr…