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

The Essential Guide to Cryptocurrency Exchange Platform Development for Beginners and Beyond

Introduction Cryptocurrencies took the world by storm, setting up a new financial system and breaking…

5 months ago

Top 20 System Administrator Interview Questions and answers

In my previous article I have given Top 20 technical support interview questions with its…

8 months ago

Desktop Support Scenario Based Interview Questions

In my previous articles I have given 15 most asked desktop support interview questions with…

8 months ago

How Do Business Analysts Use SQL for Their Needs?

A business analyst is someone who is versed in processes of data analysis used for…

8 months ago

Top 15 Control-M Interview Questions with Answers

In my previous article I have already given top questions and answers for Desktop support…

8 months ago

Top 20 SQL Interview Questions for Production Support

In my previous article I have given unix production support interview questions and answers. In…

8 months ago