按IDselect top 1 * from table order by id desc按日期select top 1 * from table where order by 日期字段 desc

解决方案 »

  1.   

     
     你不用管它们有没有关联````
     它们里面都有id,indate(日期)
     然后就是要获得最新的数据
      

  2.   


         我本想能过union来连接起来
          但是union里面不能用order by
          union也不能放在视图里面```
        郁闷中.......
      

  3.   

    select * into # from
    (
    select * from t1
    union all
    select * from t2
    union all
    select * from t3
    )aselect * from #
    where date1=(select max(date) from # )
      

  4.   

    你问的有点问题,你所谓的最新指的是什么,当天插入的数据吗,还是什么啊?  总得有个条件吧?
    如果是在触发器中,得到当前最新插入的数据 它是存放在inserted表中.
      

  5.   


    select * from
    (
    select * from table1
    union all
    select * from table2
    union all
    select * from table3
    ) a
    order by 日期字段 desc