basic solution without advance

本文內容已被 [ 北京頑主 ] 在 2004-02-06 15:24:48 編輯過。如有問題,請報告版主或論壇管理刪除.

Use "TOP" to select the first 3 lines and then get the last line from the resultset:
TSQL--SELECT * FROM YourTable TOP 3;

C#--
SQLReader reader = ExecuteReader();
int counter = 0;
While(reader.Read())
{
counter ++;
if(counter == 3)
// get the coloum value here: e.g. Console.Writeline(reader["ColumnName"];
}




--文學城www.wenxuecity.com--
請您先登陸,再發跟帖!