This video is from our "SQL Server 2000 Database Administration" course
Visit the course home page for full details (such as the videos in the course, free videos for the course, and more)

Video: Why You Use SCOPE_IDENTITY() Instead of @@IDENTITY

  • ·Skill level: 300 (Intermediate)
  • ·Run Time: 12:17
  • ·Instructor: Scott Whigham

Description:

If your queries and stored procedures use @@IDENTITY (perhaps you have legacy code updated from SQL Server 7.0 or earlier), you'll likely get good value from watching this video on replacing @@IDENTITY calls with the T-SQL function SCOPE_IDENTITY(). This video shows very plainly the negative possiblities of using @@IDENTITY today (triggers are a real problem) and, after you watch this tutorial, you'll never want to use @@IDENTITY again!

Download and watch this video

NOTE: You will need the TSCC codec installed to view video

Scott Whigham

Scott Whigham is the founder of LearnItFirst.com, one of the web's most extensive video training libraries focusing on technical training. Scott is also an experienced consultant, trainer, and author with more than a decade of hands-on experience working with SQL Server databases, writing and debugging applications using Visual Studio, and performance tuning. Scott designed the architecture (websites, class libraries, and database) for the LearnItFirst.com websites and, most re... (Scott's full bio can be found here)


NOTE: This video is part of our SQL Server 2000 Database Administration course.
This video is from Chapter 8: TSQL Programming: Stored Procedures, Variables, Functions and Triggers

Browse this course's videos now