"select id from table where id = "+id id是TEXT类型,并不是通常所用的Integer类型,sql语句应该改为"select id from table where id= '"+id+"'";