Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
virka
Starting Member
1 Post |
Posted - 2007-02-07 : 05:03:48
|
| Hi AllWell i want to fetch second record from some table like Employee(name,sex,department)and no other extra information is given to me like indexes,primary key this is possible if it's kindly pass me the code |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-07 : 05:06:41
|
| Second record according to what?Shoe size? Age? Weight?If you don't supply information about what second record is, any record is second record.Peter LarssonHelsingborg, Sweden |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-02-07 : 05:09:36
|
| [code]select top 1 * from (select top 2 * from Employee order by [name]) as t order by [name] desc[/code]Note: I assume [name] as the ordering fieldHarsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|