From the course: Learning SQL Programming

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Solution: Identifying the correct record

Solution: Identifying the correct record - SQL Tutorial

From the course: Learning SQL Programming

Solution: Identifying the correct record

- [Instructor] This challenge asked us to find the unique identifier for one record so that if we were to alter or delete that record, we'd know that we're working with precisely the record we want and that we're not accidentally modifying other records that match some non-unique criteria. To start, I added the fields that we'll be using to locate the record. First name, state code, and team in the select clause, and I added ID number, which is the unique identifier for records in the people table. I'll be using records from the people table, so that will be my from clause. And then I'll use the values, the challenge provided to filter the records. The challenge said Florida and I happen to know that the state code for Florida is fl. If you didn't, you might have joined the state's table and used the full name. That's fine. The challenge also said this participant was a member of the Cobras, but that's not the…

Contents