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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 row id

Author  Topic 

mobasha
Starting Member

45 Posts

Posted - 2007-05-22 : 02:35:09
i need to get the row number to use it in the where cluase,most off us has used Oracle rowid and sql2005 row_number()
but in sql 2000 there is nothing like this >
i have done it this way :
create table id_test
(mynewid uniqueidentifier not null default newid(),......,coln)
go
select mynewid from id_test
-----------------------------------------------------------
do u have a seconed Opinion

MobashA

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-22 : 02:37:32
Why uniqueidentifier? Why not simple Identity column?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-22 : 02:43:43
Also, why is row number important to you?
If you want to present them in front end application, you can easily do numbering there
or Give us more informations on what you are trying to do with rowid

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

mobasha
Starting Member

45 Posts

Posted - 2007-05-23 : 02:23:48
the rowid represnt the recored number in the database so i can used it to update and delete the recored using this field only,
i cant use Identity column cos i wont the column to be unique not just on the data base level.
and i want to ues it internaly.

MobashA
Go to Top of Page
   

- Advertisement -