I am using net-beans 8.1 and oracle 12c as database in windows 8. When i am trying the command "describe" in net-beans, it is showing the error given given below..
describe T;
Error code 900, SQL state 42000: ORA-00900: invalid SQL statement
Line 1, column 1
Execution finished after 0 s, 1 error(s) occurred.
But the same command is working in command line.
SQL> describe T;
Name Null? Type
----------------------------------------- -------- ----------------------------
NAME VARCHAR2(20)
ID VARCHAR2(20)
SQL>
Please any one clear it to me.
describe is a SQL*Plus command not a SQL or PL/SQL command. It can only be used in SQL*Plus or some other client tool that happens to implement a subset of the available SQL*Plus commands. I know that SQL Developer implements describe. I'm sure other tools do as well.
You can get the same information by querying all_tab_columns
select owner, table_name, column_name, data_type, data_length, data_precision
from all_tab_columns
where table_name = 'T'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With