Re: ORDER BY "RANDOM"
From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 06/17/04
- Next message: Aaron [SQL Server MVP]: "Re: ORDER BY "RANDOM""
- Previous message: Aaron [SQL Server MVP]: "Re: T-SQL Question"
- In reply to: Rafael Chemtob: "ORDER BY "RANDOM""
- Next in thread: Aaron [SQL Server MVP]: "Re: ORDER BY "RANDOM""
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Jun 2004 22:15:48 +0530
use "order by newid()"
ex:
use northwind
go
select * from customers
order by newid()
go
-- Vishal Parkar vgparkar@yahoo.co.in | vgparkar@hotmail.com "Rafael Chemtob" <rchemtobb@nospam.yahoo.com> wrote in message news:uK8sSoIVEHA.1652@TK2MSFTNGP09.phx.gbl... > hi, > I want to query a table but I want the resultset in a random order that's > decided by the SQL server. > How would I write the ORDER BY clause. > > thanks > rafael > > >
- Next message: Aaron [SQL Server MVP]: "Re: ORDER BY "RANDOM""
- Previous message: Aaron [SQL Server MVP]: "Re: T-SQL Question"
- In reply to: Rafael Chemtob: "ORDER BY "RANDOM""
- Next in thread: Aaron [SQL Server MVP]: "Re: ORDER BY "RANDOM""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|