I have a table that name is _VERSION_HISTORY I got ORA-00911 error while truncating this table. Oracle allow the name start with underscore(_) but throws an error while truncating it. Is it a silly mistake?
Asked
Active
Viewed 2,478 times
1
-
3[Nonquoted identifiers must begin with an alphabetic character from your database character set.](http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements008.htm) – Alex Poole Jul 23 '13 at 07:06
2 Answers
5
Oracle does not allow database object names to start with an underscore:
SQL> create table _T34 (col1 number);
create table _T34 (col1 number)
*
ERROR at line 1:
ORA-00911: invalid character
SQL>
So you must have used double quotes when creating that table:
SQL> create table "_T34" (col1 number);
Table created.
SQL>
Having done that once you must use double quotes whenever you reference that object?
SQL> truncate table "_T34";
Table truncated.
SQL>
So is it "a silly mistake"? Yes, but alas on your part (or whoever decided on using double-quotes to circumvent Oracle's naming conventions). Find out more.
0
It seems like you have tried to execute SQL statement with a special charter in it. I don't think it is to do with the truncate command. You might just replace the truncate with a simple Select and test this scenario. Note that the special character might appear as white space due to the font you are using.

Ali
- 899
- 2
- 13
- 33