how i select min and max values from dataset

前端 未结 4 1897
北海茫月
北海茫月 2021-01-23 11:44

i want to retrive min and max value from dataset and those values use in for loop for display title in panel

    String sql = \"select  title, song_id from up_so         


        
4条回答
  •  -上瘾入骨i
    2021-01-23 12:13

    To Get MAX And MIN Values from a Dataset

       var maxTwn = mydataset.Tables[0].AsEnumerable().Max(r =>r["TWN"]);
       var minTwn = mydataset.Tables[0].AsEnumerable().Min(r =>r["TWN"]);
    

提交回复
热议问题