From the course: Database Foundations: Data Structures
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
IDENTITY column sequences
From the course: Database Foundations: Data Structures
IDENTITY column sequences
- [Instructor] I'd like to take a quick aside and point out something that you might have noticed as we went through the process of adding and removing new rows in our orders table. Let's take a quick look at the data. I'm going to right-click on the TwoTrees database and choose New Query, and then we'll simply select everything from the orders table. If you read through the order ID values, you might spot something concerning. There's a gap in the sequence. Yours might be different from mine, but mine goes 103, then jumps to 106, so it looks like we're missing a few rows. That is not what's happening here though. Think back to the reason that we added this column to the table. These values are surrogate keys and they have no real world meaning, and their only purpose is to provide a unique value for each row. Likewise, a gap in the sequence, also has no real world significance. Because we're using the IDENTITY…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.