there is no "last record"

來源: f64 2004-06-30 19:07:30 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (382 bytes)
回答: SQL statement about going totryyyyyy2004-06-30 17:14:08
what is a table? a table is a set of records.
what is a set? a set is a bunch of similar items in no particular order.

it does not any make sense to say "last record" w/o a sort order.

if you want to track the record you last inserted, you need to use a auto increment id field. then use "top 1" and "order by id desc" clauses to get the last inserted record.

所有跟帖: 

Solutions for future ... -DBDB- 給 DBDB 發送悄悄話 (361 bytes) () 06/30/2004 postreply 20:20:58

回複:there is no "last record" -tryyyyyy- 給 tryyyyyy 發送悄悄話 (47 bytes) () 06/30/2004 postreply 20:45:40

回複:there is no "last record" -tryyyyyy- 給 tryyyyyy 發送悄悄話 (82 bytes) () 06/30/2004 postreply 21:55:46

This is for SQL Server, not -smartll- 給 smartll 發送悄悄話 (60 bytes) () 07/01/2004 postreply 01:02:23

It work in Access -tryyyyyy- 給 tryyyyyy 發送悄悄話 (0 bytes) () 07/01/2004 postreply 07:01:29

回複:回複:there is no "last record" -MD/PHD/IT- 給 MD/PHD/IT 發送悄悄話 (213 bytes) () 07/01/2004 postreply 13:35:43

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”