[Err] ORA-00923: FROM keyword not found where expected 與rownum,ora-00923rownum

來源:互聯網
上載者:User

[Err] ORA-00923: FROM keyword not found where expected 與rownum,ora-00923rownum
關於oracle的nownum


如果我想查詢表的全部資訊,並且前面加上行號,sql如下

select  ROWNUM,* from tableA


會報下面的錯誤

[Err] ORA-00923: FROM keyword not found where expected

得給表加上別名

SELECT  ROWNUM,a.* ROWNUM FROM tableA   a


為什麼需要這樣,我還沒深入學習,大家誰知道,請告訴我

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.