|
zhc19620430 发表于 2010-7-9 12:42
前几天有网友问合并查询和连接查询的区别问题,一时也没有学习。经他提醒,这两天专门对这两个查询学习了学 ...
例子都是查询excel里面的,我现在想直接把sql数据库表联查,格式如何书写?一写 left join 部分就出错
select t_bd_item_info.item_no as 商品编码,t_bd_item_info.item_name as 商品名称,t_bd_item_info.item_clsno as 品类,t_bd_item_info.item_brand as 品牌,t_bd_item_info.item_size as 规格,t_bd_item_info.main_supcust as 经销商 from "isszmv9"."dbo"."t_bd_item_info" left join "isszmv9"."dbo"."t_bd_item_brand" on "isszmv9"."dbo"."t_bd_item_info".item_brand=isszmv9"."dbo"."t_bd_item_brand.item_brandno where item_clsno like '06%' and sale_flag<>'2' and status<>'0' |
|