com.microsoft.sqlserver.jdbc.SQLServerException: 必须声明标量变量 "@P0and"。


原因: 再写SQL 或 HQL 时 
        Where  entity.id=?and ..... ?和and之间没有空格