Join Simon Allardice for an in-depth discussion in this video Finding unique values, part of SQL Server 2008 Essential Training.
- View Offline
- Exercise Files
Okay, next up is a fairly easy one.…Let's say I have got a straightforward SQL statement here, just selecting star…from SalesLT.Address, and I scan some of this information and see that I've…got a lot of information such as different states and different countries and regions.…And what I might be interested in this is this.…I don't really care about the individual pieces of data, but I'd like to know,…for example, what the different countries are that we ship to.…Well, I could start off by just filtering this data down.…
Rather than SELECT *, I'll just say well, SELECT CountryRegion FROM…SalesLT.Address and execute that.…It still returns 450 rows that I could scan through, and it certainly doesn't look…like there are too many countries, but just to be sure how could I start to ask…for those individual values.…I really just want to know it is Canada, the US, and whatever counties there are.…Well, this is what I do.…I use the word DISTINCT in the SELECT statement just before the actual column…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.