select count(*) as tj from tablename where ID=3我常用这种方法, 在写程序的时候避免空的查询结果