Post your trick

Using Column alias in where clause

select (basicsal + hra) as salary from employee where salary > 5000
It will give error (Unkown column salary in where clause.
Instead you can use :
select (basicsal + hra) as salary from employee having salary > 5000


Leave a Reply

     

     

     

Post A Trick !

How does "Kodetricks" work?

We at kodeplay like to share knowledge. With Kodetricks, even you can join us. All you need to do is post a programming related trick if you have one or rate a trick if you like someone else's.



Find us on

Technology

Contact Us