SQL问题.在线等.... 写一储存程序.. 在where条件下.. 当(Shipper = @Shipper AND Consignee=@Consignee)同时满足的时候 就不运行下面的代码. 不满足则只运行Consignee=@Consignee这一个条件...
select * from A where ______________________________________
------解决方案--------------------
SQL code
if not exists(select 1 from a where Shipper = @Shipper AND Consignee=@Consignee)
...
else
select * from a where Consignee=@Consignee
------解决方案--------------------