Home » » Oracle SQL Performance Tuning Tips-Using WHERE in Place of HAVING at A to Z help

Oracle SQL Performance Tuning Tips-Using WHERE in Place of HAVING at A to Z help

Written By M.L on ஞாயிறு, 22 ஏப்ரல், 2012 | ஏப்ரல் 22, 2012

Using WHERE in Place of HAVING !

In general, avoid including a HAVING clause in the SELECT statements. The HAVING clause filters selected rows only after all rows have been fetched. This could include sorting, summing, and etc. HAVING clause
 
usually used to filter a SELECT statement containing group functions.
 
  select *
  from account
  where cust_Active_flag = y
  having group = 001

 Instead use -

  select *
  from account
  where cust_Active_flag = y
  and group = 001
 



Note : Provide your comments by clicking below options! Thanks ! :)

0 comments:

கருத்துரையிடுக

Popular Posts

General Category