清空表数据
@Dao
interface MyDao {
@Query("DELETE FROM myTableName")
public void nukeTable();
}
检查数据是否存在
@Query("SELECT EXISTS(SELECT * FROM employee WHERE employeePhone LIKE :phone LIMIT 1)")
public abstract boolean checkExistsEmployee(String phone);
网友评论