Re: order by Desc,third data
- From: "Andrew J. Kelly" <sqlmvpnooospam@xxxxxxxxxxxx>
- Date: Sun, 20 Nov 2005 22:55:35 -0500
This should be very fast if you have the right indexes. Do you have an
index on Month?
--
Andrew J. Kelly SQL MVP
"Sam_Chou" <SamChou@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:75531889-BD27-4AAF-AA1B-86A081FF1B54@xxxxxxxxxxxxxxxx
> in sql
> I use "select top 3 from......order by (tablename) desc,that can give 3
> datas
> but i want third data to my program
> So i use other function:
>
> SELECT TOP 1 'answer'=AAA.A FROM
> (
> select distinct top 3 'A'=month FROM dataTable
> where month < '200511'
> ORDER BY month DESC
> ) as AAA
> ORDER BY AAA.A
>
> But ,how can i do fast?
> Can use other function?
.
- Prev by Date: Re: general sql server dba items
- Next by Date: Re: order by Desc,third data
- Previous by thread: Re: general sql server dba items
- Next by thread: Re: order by Desc,third data
- Index(es):
Relevant Pages
|