Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In general, Oracle provides the line and column number of any errors, but it is up to the particular API you are using (unless you happen to be writing an OCI application, which is probably unlikely) as to whether and how those APIs are called. Since the answer is likely to end up being API-specific, what API are are you using and what does your code look like when the error occurs (i.e. JDBC, ODBC, OLE DB, etc)?</p> <p>As an example, if I write a PL/SQL block with a misspelled variable name, SQL*Plus will report the line and column number of the error in addition to the error message. Many APIs, on the other hand, will just report the PLS-00201 error by default.</p> <pre><code>SQL&gt; declare 2 i integer; 3 begin 4 j := 1; 5 end; 6 / j := 1; * ERROR at line 4: ORA-06550: line 4, column 3: PLS-00201: identifier 'J' must be declared ORA-06550: line 4, column 3: PL/SQL: Statement ignored </code></pre> <p>Similarly, if you execute a SQL statement with an invalid variable name, SQL*Plus will get the column and line position and put a * under the offending character, i.e.</p> <pre><code>SQL&gt; create table a( col1 number ); Table created. SQL&gt; insert into a( colN ) values ( 1 ); insert into a( colN ) values ( 1 ) * ERROR at line 1: ORA-00904: "COLN": invalid identifier </code></pre> <p>Most PL/SQL IDE's (TOAD, SQL Developer, etc.) will do something similar by interrogating the appropriate OCI APIs under the covers. Precisely how this is done, however, will depend on the API.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload