Q&A

Q1:If the server won't convert my data type to hold fractions, what happens when I get the sum of something too big to be held?
A1: The server is smart enough to promote the data type to the next larger data type to hold the result of an aggregate or calculation.
Q2:Functions look really interesting, but it seems like a lot of work to type in all that stuff just for a simple result set.
A2: Functions are frequently used in the production of stored procedures and triggers. They enable you to provide consistent code for particular actions that will be used in many places in an application.

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.