cmd.CommandText = "SELECT RoomID FROM RoomQuantity A WHERE A.RoomID = (SELECT MAX(RoomID) FROM RoomQuantity)";
cmd.CommandText = "SELECT TOP 1 RoomID FROM RoomQuantity ORDER BY RoomID desc;";
數據庫 表檢索最後一行的記錄:RoomQuantity - 柱: - : R1 R2 R3 R4 R5 R6 R7 R8 R9在RoomID數據RoomID R10問題與來自SQL數據庫
問題 - 始終檢索R9而不是R10
後,讀取的行的代碼。 – Bohemian