Database Fundamentals/Functions
< Database FundamentalsThis lesson introduces functions.
Objectives and Skills
Objectives and skills for the functions portion of Microsoft Exam 98-364 Database Fundamentals include:[1]
- Create database objects
- Create stored procedures and functions
- Select, insert, update, or delete data
- Create stored procedures and functions
Readings
Multimedia
- Watch Microsoft Virtual Academy: Creating Databases and Database Objects.
- Watch YouTube: SQL Functions.
Activities
- Use SQL Server to create built-in functions to calculate data in the Student table in your College database.
- Create the following built-in functions:
- Apply the AVG function in a query to display the average number of course credit hours in the Course table.
- Apply the MAX function in a query to display the maximum number of course credit hours in the Course table.
- Apply the SUM function in a query to display the total number of course credit hours in the Course table.
Lesson Summary
- A user-defined function (UDF) is a function provided by the user of a program or environment, in a context where the usual assumption is that functions are built into the program or environment. [2]
- An aggregate function is a function where the values of multiple rows are grouped together as input on certain criteria to form a single value of more significant meaning or measurement such as a set, a bag or a list.). [3]
Key Terms
- function
See Also
- Microsoft: Aggregate Functions (Transact-SQL)
- W3Schools.com: SQL Functions
- Tutorials Point:SQL Useful Functions
References
This article is issued from Wikiversity - version of the Thursday, March 10, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.