From the course: Program Databases with Transact-SQL

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Deterministic vs. nondeterministic functions

Deterministic vs. nondeterministic functions - SQL Server Tutorial

From the course: Program Databases with Transact-SQL

Start my 1-month free trial

Deterministic vs. nondeterministic functions

- [Instructor] SQL Server ships with a ton of built-in functions that are useful for exploring and analyzing your data. Like in other programming languages, SQL Server's functions usually take a set of input parameters or arguments, and then run those values through their programming logic and return a result. Some functions don't take any arguments though. For instance, the get date function or the RAND function don't have any arguments. You still need to include the open and closed parentheses though when you execute them. Get date will return the current system date and time, and RAND returns a random number. In order to see their results, I'm going to put them into a select statement. So we'll select get date as today and select RAND as random. This will return two result windows, and I can see that the get date function is returning the current system date and time on my computer. And the random function is simply returning a random number between zero and one. Now most functions…

Contents