那你就用两条delete语句阿,先删明晰表,再删请表阿
如:
删明晰表
  delete from 明晰表 where bianhao ='aaaa';
删主表
  delete from 主表 where bianhao ='aaaa';

解决方案 »

  1.   

    delete from 明晰表 where bianhao in (select bianhao from 主表 where 条件)
    delete from 主表 where 条件
      

  2.   

    删明晰表
      delete from 明晰表 where bianhao =select bianhao from 主表 where 日期=日期条件
    删主表
      delete from 主表 where 日期=日期条件
      

  3.   

    在主表上建立触发器
    Create Triggle MyTrg
    on 主表
    for Delete
      Declare @bianhao VarChar(20)
      SELECT @bianhao = bianhao from Deleted
      DELETE FROM 明晰表 WHERE bianhao = @编号
      

  4.   

    删除明晰表
    delete from 明晰表 where bianhao in(select bianhao from 主表 where 
    日期<‘’)
    删除主表
    delete form 主表 where 日期<''