[size=large]首先是數據庫表a和數據庫表b的內連接,然後是數據庫表a與數據庫表c的左連接。
on和where後面跟隨的都是條件[/size]
select * from
a inner join b on 條件 where ...
left join c on 條件 where ...
[b][size=x-large]
2、列出一張表同一字段出現大於等於2次的列,sql怎麼表達
[/size][/b]
select t.vcexpressinvoicecode,count(t.vcexpressinvoicecode) from tbexpressinvoice t
group by t.vcexpressinvoicecode
having count(t.vcexpressinvoicecode)>2;