SqlCommand cmd=new SqlCommand("delete from question,answer where question.num='"+num+"'and question.name=answer.name ",con);
-----------------------------------------------
SqlCommand cmd=new SqlCommand("delete from question,answer where question.num='"+num+"'and question.name='"+answer.name+"' ",con);
-----------------------------------------------
SqlCommand cmd=new SqlCommand("delete from question,answer where question.num='"+num+"'and question.name='"+answer.name+"' ",con);
SqlCommand cmd1=new SqlCommand("delete from answer where question.name=answer.name and question.num='"+num+"'",con);
cmd1.ExecuteNonQuery();
SqlCommand cmd=new SqlCommand("delete from question where num='"+num+"'",con);
cmd.ExecuteNonQuery();出现列前缀 'question' 与查询中所用的表名或别名不匹配。