You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is something strange in error message when i want to create index for NON-existent table.
Consider following script (doing it on empty database):
SQL> create index no_such_index on no_such_table( some_fantastic_column );
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-Unknown columns in index NO_SUCH_INDEX
SQL>
Why "unknown COLUMNS" are mentioned here ? I just used wrong name of TABLE rather than column(s) of it.
IMO, much better to raise SQLSTATE = 42S02 ("-Table unknown"), similar to this case:
SQL> select * from no_such_table;
Statement failed, SQLSTATE = 42S02
Dynamic SQL Error
-SQL error code = -204
-Table unknown
-NO_SUCH_TABLE
The text was updated successfully, but these errors were encountered:
Submitted by: @pavel-zotov
There is something strange in error message when i want to create index for NON-existent table.
Consider following script (doing it on empty database):
SQL> create index no_such_index on no_such_table( some_fantastic_column );
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-Unknown columns in index NO_SUCH_INDEX
SQL>
Why "unknown COLUMNS" are mentioned here ? I just used wrong name of TABLE rather than column(s) of it.
IMO, much better to raise SQLSTATE = 42S02 ("-Table unknown"), similar to this case:
SQL> select * from no_such_table;
Statement failed, SQLSTATE = 42S02
Dynamic SQL Error
-SQL error code = -204
-Table unknown
-NO_SUCH_TABLE
The text was updated successfully, but these errors were encountered: