Machine-translated by Google. Questions are authored in English.
Top

Discussion

What is an advantage of placing computations in SQL views?

  • A.To save users from having to write an expression.
  • B.
    To ensure that the results are consistent.
  • C.To accomplish both of the above.
  • D.None of the above is correct - computations cannot be placed in a view.

Answer: C

Correct answer: To accomplish both of the above.

Both reasons matter and the second is the stronger. Putting the expression in the view saves every user from writing it, and more importantly ensures they all use the same one - so a margin or a total means the same thing wherever it is quoted, and a change to the definition takes effect everywhere at once.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.