In my previous article, I have explained about the most common errors in Oracle. In This article, I will try to explain another most common error, which has been searched approximately 15000 times in a month by DBAs and developers. When you forget the actual syntax of the oracle select statement then the ORA-00936 missing expression error will come. While working with databases I have frequently faced ORA-00936: missing expression and struggled to solve and debug this issue. This kind of error will occur when user miss the syntax of SQL expression.
ORA-00936: missing expression is very common oracle error occurred due to the syntax of oracle statement.
Some Oracle mistakes are not nearly as intimidating to resolve, as the error message would seem to indicate. The ORA-00936 is the perfect example of such a case. This error provides an excellent case where thinking too hard about the answer will cost you far more time and effort than needed.
Reason for this error:
The ORA-00936 message is a missing expression error in Oracle. That entire ‘missing expression’ means is that when attempting to operate a query, a particular part of the clause necessary for it to function was omitted in the text. Stated simply, you left out an important chunk of what you were trying to run. This is most common error occurred during the syntax of SQL statement. If user failed to write or omit something in SQL query then ‘Missing Expression’ error will come.
Missing Information in Select Statement:
If user forgets to write the columns in the select statement then missing expression error will come.
Example:
Select * from Employee;
Select from Employee; —Error of missing expression will come.
From Clause is Omitted:
If user forgets to write the ‘from clause’ in select statement then missing expression error will come.
Example:
Select * from Employee;
Select * Employee; —Missing Expression error will come
As I have explained that missing expression error will come due to the bad syntax of ‘Select statement’ user needs to check the select statement is properly written or not. While working with huge queries then it is not easy for the user to find out where the actual error is. So finding out where the error is coming is important.
Resolution 1:
User needs to check the missing information from select statement. Most of the time the column names are missing in select statement.User needs to check that all columns are there in select statement.User needs to check the columns using desc command and make changes in the select statement.
Example :
Select from Employee;
It will fire that error so user needs to check the columns in Employee table using following statement:
Desc Employee;
Select Employee_Name,Employee_Number from Employee;
Resolution 2 :
Add from Clause in select statement
User needs to add ‘From’ clause at proper place in select statement.
Select * Employee;
Resolution Query :
Select * from Employee;
So these kind of errors are very easy to solve just user needs to concentrate on syntax of select statement.
In my previous article I have given details about application support engineer day to day…
In my previous articles I have given the roles and responsibilities of L1,L2 and L3…
In my previous articles i have given the hierarchy of production support in real company…
In this article i would like to provide information about production support organization structure or…
In my previous article I have given roles for L1 and L2 support engineer with…
I have started this new series of how to become application support engineer. This article…