Buy Questpond's video subscriptions on
huge discount
.
Online: 1817
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
Sql Server
>
Loading ...
Can we use NEWID(), or RAND() in function?
Posted by
Virendradugar
on 9/10/2009 | Category:
Sql Server Interview questions
| Views: 7975
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
No
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
Can we use "Print" statement in function ...
Next > :
What is Difference between Callbacks and Postback ...
Comments or Responses
Posted by:
Pandians
on: 9/10/2009
Hi Virendradugar
Your question is :
Can we use nondeterministic functions such as GETDATE(), NEWID(), or RAND() in function?
Generally....
GETDATE() /GETUTCDATE() / CURRENT_TIMESTAMP are Non-Deterministic function. But we can use it in User Defined Function.
NEWID() and RAND() can not be used.
CREATE FUNCTION Ufn_Test() RETURNS DATETIME
BEGIN
DECLARE @A DATETIME
SELECT @A = GETDATE()
RETURN(@A)
END
SELECT dbo.Ufn_Test()
Cheers
Login to post response
More Interview Questions by Virendradugar
What is Difference between Callbacks and Postback in ASP.NET?
What Are The Difference Between AutoEventWireup="true" and A ...
Can two different programming languages be mixed in a single ASMX file ...
How many .NET languages can a single .NET DLL contain?
Can we use Truncate command on a table which is referenced by FOREIGN ...
How many classes can a single .NET DLL contain?
What command do we use to rename a db, a table and a column?
What is a table called, if it has no Cluster Index?
Latest Interview Questions
________is one of the new feature added in C# 4.0 ?
How can we access COM object in C#4.0?
________ is new type introduced in C#4.0?
Which is the base class for TypedDataset
Which of the following class does not belong to Collection namespace ?
Which property of textbox cannot be change at run time?
What is the name of base class for .NET
Is it Possible to create more than one machine config file.
More ...