0
這裏是表 和類似的數據:要上線和下線的數據進行特定的ID
id name 1 test1 2 test2 3 test3 4 test4 5 test5 6 test6
從以上數據我要像 數據如果我通過了id作爲參數和返回從數據從向上和由順序袍
例如,如果我傳遞id作爲參數= 4,則它應該是返回 上線2行和下行2行爲特定的ID,並且它應該是這樣的
id name 2 test2 3 test3 4 test4 5 test5 6 test6
和同爲ID = 3
id name 1 test1 2 test2 3 test3 4 test4 5 test5
假設'id'是一個主鍵,可能最好在這裏使用'UNION ALL'。 – RedFilter 2010-01-18 14:57:09
是的,它在工作 – Paresh 2010-01-18 14:58:59
你好,我已經嘗試過上面的腳本。因爲聯盟和秩序是不一起工作的。 – Paresh 2010-01-19 10:35:48