解决方案 »

  1.   

    select  brand1,brand2
    from (select row_number()over(order by getdate())id,brand1 from tb1)a inner join
     (select row_number()over(order by getdate())id,brand2 from tb2)b on a.id=b.id
      

  2.   

    版主,我的两个table分别是icf_result和icf_result1。我这么写还是报错。select  brand1,brand2
    from (select row_number()over(order by getdate())id,brand1 from icf_result)a inner join
     (select row_number()over(order by getdate())id,brand2 from icf_result1)b on a.id=b.id
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(order by getdate())id,brand1 from icf_result)a inner join
     (select row_number()' at line 2
      

  3.   

    需不需要我帮你移到mysql版?
      

  4.   

    他说这个是什么意思啊partition by and order by option is required
      

  5.   

    帮我移到mysql吧,太谢谢您了
      

  6.   

    已经移动了,另外SQLServer不是必须要有partition by,可以之用order by,而你的错误提示貌似mysql强制包含partition by