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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 need a TRIGGER ???

Author  Topic 

erdem537
Starting Member

2 Posts

Posted - 2008-09-17 : 07:31:45
hi i have a table which has an ID and ENTRY DATE,etc..
When i want to insert a new record, i want to add this record next to records which has the same ID and these are in DESCANDING ORDER according to the ENTRY DATE..

how to I provide this inside the databse ??

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-17 : 07:38:28
you dont have to be worried about order of insertion of record to table. you can always retrieve data from table in order you want by specifying order by clause
Go to Top of Page

erdem537
Starting Member

2 Posts

Posted - 2008-09-17 : 07:51:12
is there any difference at PERFORMANCE while taking data from database (in order or not ordered)... because according to my program i need to take these related records group by group.. for exp;.... WHERE ID ='4'.. In a big database does it make any sense ??
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-17 : 08:18:17
quote:
Originally posted by erdem537

is there any difference at PERFORMANCE while taking data from database (in order or not ordered)... because according to my program i need to take these related records group by group.. for exp;.... WHERE ID ='4'.. In a big database does it make any sense ??


order by causes sorting which will have some impact on performance.
Go to Top of Page
   

- Advertisement -