select a.*,c.名称,c.型号,c.重量 from 表1 a,表2 c where a.品种编号=c.品种编号

解决方案 »

  1.   

    没看出表2有什么用。
    Select identity(int,1,1) as id,a.地区代码,a.品种编号,a.单价,b.名称,b.型号,b.重量 
    into #tmp
    from 表1 a
    join 表3 c on a.品种编号 = b.品种编号select * from #tmp
      

  2.   

    服务器: 消息 207,级别 16,状态 3,行 1
    Invalid column name '名称'.
    服务器: 消息 207,级别 16,状态 1,行 1
    Invalid column name '型号'.
    服务器: 消息 207,级别 16,状态 1,行 1
    Invalid column name '重量'.
      

  3.   

    select a.*,c.名称,c.型号,c.重量 from 表1 a,表3 c where a.品种编号=c.品种编号
      

  4.   

    Select identity(int,1,1) as id,a.地区代码,a.品种编号,a.单价,b.名称,b.型号,b.重量 
    into #tmp
    from 表1 a
    join 表3 b on a.品种编号 = b.品种编号select * from #tmp