Re: sorting table while inserting
- From: Jason Lepack <jlepack@xxxxxxxxx>
- Date: 29 May 2007 09:19:27 -0700
Tables don't store data in a logical order. They store data in a
physical order. If you want to see data in an ordered fashion then
create a view to do that. Also, Name is a reserved word, don't use
it...
SELECT
No,
NameField,
Phone
FROM
yourTable
ORDER BY
No, NameField, Phone
Cheers,
Jason Lepack
On May 29, 12:04 pm, Oonz <arund...@xxxxxxxxx> wrote:
Hi Friends,
How can we insert records in sorted order
like consider a table
No Name Phone
1 test1 12345
1 test1 23455
2 test2 68638
3 test3 67684
4 test4 54808
4 test4 74594
if i add a new record like this
2 test2 34454
it should go in specific order. so that the final table should look
something like this
No Name Phone
1 test1 12345
1 test1 23455
2 test2 34454
2 test2 68638
3 test3 67684
4 test4 54808
4 test4 74594
.
- Follow-Ups:
- Re: sorting table while inserting
- From: Oonz
- Re: sorting table while inserting
- References:
- sorting table while inserting
- From: Oonz
- sorting table while inserting
- Prev by Date: sorting table while inserting
- Next by Date: Re: sorting table while inserting
- Previous by thread: sorting table while inserting
- Next by thread: Re: sorting table while inserting
- Index(es):