两站表联合查询~ 、第一张表 
SELECT [StationID]
      ,[Date]
      ,[Rain]
  FROM 表a
where StationID = '12345' and date = 20100608 and Time ='2200'第二张表select name 
from 表b
where StationID = '12345' 如何联合查询得到一个有name字段的新表

解决方案 »

  1.   

    select [StationID],
           [Date],
           [Rain],
           [name] 
    FROM 表a a, 表b b
    where a.StationID=b.StationID and StationID = '12345' and date = 20100608 and Time ='2200'
      

  2.   


    select a.[StationID],[Date],[Rain],[name]
    from 表a a join 表b b
    on a.StationID = b.StationID
    where a.StationID = '12345' and date = '20100608' and Time ='2200'要这个?
      

  3.   

    对的,否则[StationID]将是ambiguous column