原来是ORACLE数据库的查询语句,怎么改成mysql的。不然会报没有别名的错误。求大神
("SELECT*FROM(SELECTa.*,ROWNUMrnFROM("+"SELECTtb_company.company_id,company_pic,job_i...
("SELECT * FROM ( SELECT a.* , ROWNUM rn FROM ( " + "SELECT tb_company.company_id,company_pic,job_id," + "job_name,job_salary,job_area,job_endtime " + "FROM tb_company " + "LEFT OUTER JOIN tb_job ON tb_company.company_id=tb_job.company_id " + "WHERE company_state=1 and job_id IN (" + "SELECT MAX(job_id) FROM tb_job WHERE job_state=1 GROUP BY company_id" + ")) a WHERE ROWNUM<=? ) WHERE rn>? ");
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询