Skip to content
Advertisement

Using CASE with Table Join

I am using Oracle 11g.

I have two tables:

enter image description here

enter image description here

I want to display student_name, course, fee and a column with discounted fee where the fee is reduced by 10% if it is either ‘BIT’ or ‘MIT’.

I’ve come up with following query but it gives an error:

ORA-00923: FROM keyword not found where expected:

Advertisement

Answer

You can use decode as follows:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement