谁能帮我解释一下,这些SQL语句呀??
条件:h.trx_no = d.trx_no  and h.trx_no *= w.deposit_no and date(w.wo_date) =date(h.trx_date) and h.client_code *= m.mbr_code and d.item_code=i.item_code 
and h.trx_type in ('SAL') and h.hflag in ('S','SR','DS')  and h.doc_type not in ('SA5') and h.trx_status <> 'C' and h.trx_no not in(select card_no from trx_payment where trx_no like 'DR%' and card_no is not ntull)特别是”*“是什么意思:h.trx_no *= w.deposit_no 

解决方案 »

  1.   

    Transact-SQL 联接
    在早期的 Microsoft® SQL Server™ 2000 版本中,使用 *= 和 =* 在 WHERE 子句中指定左、右外部联接条件。有时,该语法会导致有多种解释的不明确查询。FROM 子句中指定遵从 SQL-92 的外部联接,不会导致上述不确定性。因为 SQL-92 语法更为精确,所以,本版中未包括有关在 WHERE 子句中使用旧的 Transact-SQL 外部联接语法的详细信息。以后的 SQL Server 版本可能不再支持该语法。任何使用 Transact-SQL 外部联接的语句都应改为使用 SQL-92 语法。SQL-92 标准支持 FROM 或 WHERE 子句中的内部联接规范。WHERE 子句中指定的内部联接不会出现与 Transact-SQL 外部联接语法相同的不确定性问题。
      

  2.   


    SQL2005之前,左联接 语句的写法,
    比如:
    select A.a,B.a
    from A left outer join B 
    where A.a*=B.a
      

  3.   

    h.trx_no *= w.deposit_no 
    表示h left join w on h.trx_no = w.deposit_no 已被废弃的语法。
      

  4.   

    还有h.trx_type in ('SAL')这条中的in呢,是什么意思呀?
      

  5.   

    还有h.trx_status <> 'C'这条语句中的“<>” 有什么作用呢?
      

  6.   

    还有h.trx_status <> 'C'这条语句中的“<>” 有什么作用呢?