What are Deterministic and Non deterministic Functions?

 Posted by Bhaskara on 5/4/2011 | Category: Sql Server Interview questions | Views: 19668 | Points: 40
Answer:

Deterministic functions always return the same result any time they are called with a specific set of input values and given the same state of the database. Non deterministic functions may return different results each time they are called with a specific set of input values even if the database state that they access remains the same.

Deterministic functions - SUM, AVG, DAY, ISNUMERIC, ISNULL, CONVERT
Non deterministic functions - GETDATE, RAND, @@ROWCOUNT. USER_NAME, IDENTITY


Asked In: WIPRO | Alert Moderator 

Comments or Responses

Posted by: PandianS on: 5/6/2011 | Points: 10
Hi

CONVERT - Is not always Deterministic. It depends on Format Standard. Its Non-Deterministic when we use 0,9,13,100,106,107,109,113,130 standards.

Cheers

Login to post response

More Interview Questions by Bhaskara