Categories: Oracle Errors

ORA-00936: missing expression | How to resolve ORA-00936 error?

ORA-00936: missing expression :

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.

Why ORA-00936 error will come?

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.

 

NO TIME TO READ CLICK HERE TO GET THIS ARTICLE

 Example:

Select * from Employee;

Select * Employee;   —Missing Expression error will come

 Resolution of the error:

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.

Amit S

Oracle Consultant with vast experience in Oracle BI and PL/SQL Development. Amiet is the admin head of this website who contributes by preparing tutorials and articles related to database technologies. He is responsible to manage the content and front-end of the website.

Share
Published by
Amit S

Recent Posts

What is Root Cause Analysis (RCA) With real examples

In my previous article I have given details about application support engineer day to day…

1 week ago

Application Support Engineer Day to day responsibilities

In my previous articles I have given the roles and responsibilities of L1,L2 and L3…

2 weeks ago

What is mean by SLA ( Service Level Agreement) with Examples?

In my previous articles i have given the hierarchy of production support in real company…

2 weeks ago

What is Production support Hierarchy in organization?

In this article i would like to provide information about production support organization structure or…

2 weeks ago

What are roles and responsibilities for L3 Support Engineer?

In my previous article I have given roles for L1 and L2 support engineer with…

2 weeks ago

What are roles and responsibilities of L2 Engineer?

I have started this new series of how to become application support engineer. This article…

2 weeks ago