Join Simon Allardice for an in-depth discussion in this video Defining keys, part of SQL Server 2008 Essential Training.
- View Offline
- Exercise Files
One thing you should do on all of your tables, at least as a general rule, is…defined what's called a primary key. This is a way that's going to identify…how do we get to an individual role. One value that would always take us to…just one row in that table.…And your primary key can be any of the columns that you actually have defined if…that makes sense. Sometimes it does, sometimes it doesn't.…If I look at my Product Table, for example I have ProductID, ProductName,…UnitPrice and UnitsInStock, and let's say that my business process was such…that ProductIDs were decided around a conference table and manually entered into the database.…
Well I could say then ProductID should be my primary key.…One ProductID should always identify a row in this table in this database.…Well I have it open in Design. I can right- click the column and just say Set primary key.…Notice what happens to the Allow Nulls column when I do this.…It's going to turn it off because when you think about it, it doesn't make sense.…
- Using T-SQL (Transact-SQL)
- Managing databases with SQL Server Management Studio
- Understanding database normalization
- Using SELECT statements
- Building indexes
- Monitoring database size and integrity
- Backing up and restoring databases
- Creating functions and stored procedures
- Managing database permissions
- Creating and formatting reports
- Adding charts to reports
- Creating and executing a simple SSIS package
Skill Level Beginner
1. Getting Started
2. Installing SQL Server 2008 R2
3. Tools and System Databases
SQL Server system databases2m 22s
4. Creating Databases
5. Importing Existing Data
6. Retrieving Data with SQL
7. Inserting and Updating Data
8. SQL Functions
9. Stored Procedures and Transactions
10. Core Administration Tasks
11. Backing Up and Restoring
12. Security Features
13. Reporting Services
14. Integration Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.