帶你深入了解如何根據數據庫時間戳選擇列

發表于:2009-09-14來源:作者:點擊數: 標簽:數據庫時間選擇
帶你深入了解如何根據數據庫時間戳選擇列 數據庫開發 關鍵字:問題:我在工作中遇到了難題,一列數據,除了時間戳以外別的都一樣,誰能告訴我,應該如何來選擇? 解答: --假如知道timestamp的值 select * from table where timestamp = 0x00000000000007EA

帶你深入了解如何根據數據庫時間戳選擇列  數據庫開發

關鍵字:問題:我在工作中遇到了難題,一列數據,除了時間戳以外別的都一樣,誰能告訴我,應該如何來選擇?

解答:

--假如知道timestamp的值

select * from table where timestamp = 0x00000000000007EA

--不知道值

--第二列

select top 1 * from table where timestamp not in (select top 1 timestamp from table )

--第三列

select top 1 * from table where timestamp not in (select top 2 timestamp from table )

--第四列

select top 1 * from table where timestamp not in (select top 3 timestamp from table )

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97