What is the reason for not working of 'describe' command on oracle?

ⅰ亾dé卋堺 提交于 2019-12-23 03:10:02

问题


i am trying to run the 'describe table_name' command on oracle. I am using dbeaver for accessing oracle. But, when i run the command, it shows SQLException and error message "invalid sql statement". How can i perform the operation?


回答1:


describe is not a SQL statement, otherwise it would have been documented in the SQL language reference:

  • https://docs.oracle.com/database/121/SQLRF/toc.htm

The documentation for the describe command can be found in the SQL*Plus command reference:

  • https://docs.oracle.com/database/121/SQPUG/ch_twelve001.htm#SQPUG023

which means it is only available in SQL*Plus (and probably in SQL Developer as well). It is a client side command and thus the SQL client you are using needs to support it.




回答2:


DESC[RIBE] command is an SQL*Plus command only, even if you try it in SQL Developer it will not work !

Source : https://ss64.com/ora/desc.html




回答3:


Highlight the object and press f4 , this would give you the table/object details

https://dbeaver.io/forum/viewtopic.php?f=3&t=1937

as @a_horse_with_no_name has already said desc is not a SQL statement. So we can use this shortcut for that




回答4:


I just tried it on SQL Developer and it worked. Maybe it wasn't available before, but certainly is SQL Developer 19.1.



来源:https://stackoverflow.com/questions/37133666/what-is-the-reason-for-not-working-of-describe-command-on-oracle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!