Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

oracle

dbeaver

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?

like image 482
NIDHEESH KRISHNA Avatar asked May 10 '16 08:05

NIDHEESH KRISHNA


People also ask

What is describe command in Oracle?

The DESCRIBE command enables you to describe objects recursively to the depth level set in the SET DESCRIBE command. You can also display the line number and indentation of the attribute or column name when an object contains multiple object types. For more information, see the SET command.

What is the use of describe command?

The DESCRIBE command displays metadata about the columns, indexes, and data partitions of tables or views. This command can also display metadata about the output of SELECT, CALL, or XQuery statements.

How do you get the description of a table in Oracle?

For a list of tables in the current schema, use the Show Tables command. For a list of views in the current schema, use the Show Views command. For a list of available schemas, use the Show Schemas command. If the table or view is in a particular schema, qualify it with the schema name.

Can we use describe in SQL Developer?

DESC is an Oracle client command - works in SQLPlus, SQLcl, and SQL Developer - WHEN connected to an Oracle Database. The best we have to offer you is, open the table from your browser, and see the Columns page. Or like someone has offered, write query or use the provided SP that MSFT gives you.


1 Answers

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.

like image 176
a_horse_with_no_name Avatar answered Sep 23 '22 22:09

a_horse_with_no_name