sql - How to Remove duplicate values from join query -


hi ever 1 how can remove duplicate records join statement.

select  std_info.reg_no, std_info.std_name, tut_fee.fee_month, class.class_name  std_info    inner join tut_fee on std_info.reg_no=tut_fee.reg_no    inner join promot on std_info.reg_no=promot.reg_no    inner join class on class.class_id=promot.class_id std_info.reg_no not in (select reg_no                                tut_fee                                tut_fee.fee_month=3                                 , tut_fee.fee_year=2014) 

it give result

 reg_no     std_name    fee_month   class_name   1. a01      name1         1           2nd  2. a01      name1         2           2nd  3. a02      name2         1           3rd  4. a02      name2         2           3rd 

thanks all.

the dublicat come column "tut_fee.fee_month,"


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -