Oracle - Can't use * sign with other column in select clause

前端 未结 3 1948
时光说笑
时光说笑 2021-01-23 04:56

Sorry if it\'s trivial, but selecting column with * sign isn\'t working always, and I don\'t find reference to this behavior.

I can select table A

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-23 05:35

    Why are the errors so misleading?

    The errors are correct. They just don't guess what you are trying to do. After

    select *
    

    the next keyword should be from, so anything else gives

    FROM keyword not found where expected
    

    After , there should be a valid expression such as a column name, not * which is unexpected, so you get

    ORA-00936: missing expression
    

    Perhaps it would be nice if Oracle wrote a special error message about the incorrect use of *, but so far they have not. You could propose it on the Oracle Database Ideas forum.

提交回复
热议问题