如果获取一个表列的最大值..时间:2022-08-03 10:43:22 DataRow[] drs = ds.Tables[ " a " ].Select( " Quantity = MAX(Quantity) " ); if (drs.Length > 0 ) Console.WriteLine(drs[ 0 ][ " Quantity " ]); Dim dt As DataTable = CType (DataGrid1.DataSource, DataTable) Dim dr As DataRow() = dt. Select ( " 2>1 " , " id Desc " ) Debug. WriteLine (dr( 0 ).Item( " ID " ))