requirement is, both field must be equal, what would you do
declare @var datetime
set @var = getdate()
update table set f1=@var,f2=@var
or simply
update table set f1=getdate(),f2=getdate()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Definitely the first way, because 2 calls to getdate() will most likely return different values.