Microsoft Exam Questions

Which of the following WHERE clauses would be the most efficient WHERE clause to use?

You work as a SQL Server 2012 database developer at ABC.com. ABC.com has a database
named SalesDB.
You are developing a stored procedure that takes a parameter named @date that uses the
varchar datatype. The @date parameter must be compared to the value in a datetime column

named OrderDate.
Which of the following WHERE clauses would be the most efficient WHERE clause to use?

A.
WHERE OrderDate = CAST(datetime,@date)

B.
WHERE OrderDate = CONVERT(datetime,@date)

C.
WHERE OrderDate =@date

D.
WHERE OrderDate = CAST(@date AS datetime)

E.
WHERE OrderDate = PARSE(@date AS Date)

Explanation: