In this chapter, we'll look at some relatively common programming tasks that aren't as simple as you might think. If you find a solution here for something you need to do, that's great. But the real goal is to give you some insight into the power and flexibility of Transact-SQL. For some examples, we'll offer multiple solutions, often with different performance characteristics. Keep in mind that there are often many ways to solve a problem.