1) create a variable table with identity incremented by 1
2)select top 2 * into that table
3) select top 1 * from that table order by identity field descending order\
4) finish


On Sat, Mar 5, 2011 at 2:39 AM, praveen singh <[email protected]> wrote:

> how get second maxima in sql queries?
>
> --
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net
>



-- 
johnhadikusumo.blogspot.com
www.miniadverts.com.au
www.livingsuburb.com.au
www.satuindonesia.com.au
www.redballoontravel.com
www.myfile.us
www.highheelsandwig.com

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to