课程: Program Databases with Transact-SQL
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Solution: Create a function
(upbeat music) - [Instructor] I hope you were able to write out a function that took a look at temperature data inside of the Wide World Importers database. So let's walk through the solution together. I've just gone ahead and opened up a new query window and put in some comments here at the top to remind ourselves what it is that we're trying to do here. We're going to create a function that analyzes temperatures and the conditions that we placed on this is that we wanted to evaluate temperature values and if the temperature was less than 3.5, we want it to say too cold. If it's above four, we'll say too hot and everything else is just right. So let's take a look at the data that we want to work with first. And we were working with the warehouse.ColdRoomTemperatures data. So let's just see what's in there first. So I select everything out of the warehouse.ColdRoomTemperatures table, and it looks like there's four rows right now. And we have some temperature values that span that…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。