SOLVED

ORA-00911: invalid character

Asked by OracleDba13 viewsoracle

#oracle#error

Solutions(1)

Accepted Solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
ORA-00911: invalid character

ORA-00911

: This is very common error & it Occurs usually for syntax mistakes.

occurs usually when a programmer makes one of the following mistakes

1.

when a special character is added in an SQL statement with column name.

SQL> select ename# from emp.hr;

select ename# from emp.hr

*

ERROR at line 1:

ORA-00904: "ENAME#": invalid identifier

2. when string is not enclosed by single quotes in where clause condition.

SQL> select * from emp where ename like A%;

select * from emp where ename like A%

                                    *

ERROR at line 1:

ORA-00911: invalid character

3. When some non-printable/special character added because of paste of sql statement from other editer.

SQL> select * from emp.HR where ename like `A%`;

select * from emp.HR where ename like `A%`

                                         *

ERROR at line 1:

ORA-00911: invalid character

4.

when semicolon (;) is added to end the query in execute immediate of pl/sql.

SQL> begin

2 execute immediate 'update emp.hr set sal = sal * 1.1 where deptno=10;';

3 commit;

4 end;

5 /

begin

*

ERROR at line 1:

ORA-00911: invalid character

ORA-06512: at line 2

5. when a extra semicolon (;) is added to end the query.

SQL> select empno from emp;;

select empno from emp;

                     *

ERROR at line 1:

ORA-00911: invalid character

Hope it Helps!
OracleDba

Post Your Solution