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)
 why do we use @@identity???

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-07-12 : 07:14:06
Rohit Kochar writes "Please tell me why i should use @@identity in my stored procedure??
Thanking you."

Kristen
Test

22859 Posts

Posted - 2005-07-12 : 07:26:23
You shouldn't, its a legacy thing. You should use SCOPE_IDENTITY() instead

Kristen
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-07-12 : 09:19:15
You should use Natural Keys and never us them

Joe, Joe! Where art thou Joe C?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2005-07-12 : 09:32:49
/me watches Brett grind an axe

And Kristen was correct, Brett is just having his morning fun

*need more coffee*
SELECT * FROM Users WHERE CLUE > 0
(0 row(s) affected)
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-07-12 : 10:08:03
quote:
Originally posted by DonAtWork

/me watches Brett grind an axe

And Kristen was correct, Brett is just having his morning fun

*need more coffee*
SELECT * FROM Users WHERE CLUE > 0
(0 row(s) affected)



Perhaps...but I still say it's overused and abused...paper thin indexes aside...I hate that argument...

If I have to use only one, where you have to use many to incorporate joins, where's the savings?

Joe? Is that you Joe? And besides nothings perfect. Just ask Fabian

http://weblogs.sqlteam.com/brettk/archive/2005/01/12/3968.aspx



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2005-07-12 : 10:15:30
hehe. I attended a DB users meeting and Fabian Pascal was the guest speaker. Interesting fellow. Very smart. Just not very flexible in his views is all.

*need more coffee*
SELECT * FROM Users WHERE CLUE > 0
(0 row(s) affected)
Go to Top of Page
   

- Advertisement -