222 Part I EXAM PREPARATION tinyint). The precision

222 Part I EXAM PREPARATION tinyint). The precision of built-in operations on float data type data is six decimal places by default. By default, a number passed to a mathematical function is interpreted as a decimal data type. The CAST or CONVERT functions can be used to change the data type to something else, such as a float. For example, the value returned by the FLOOR function has the data type of the input value. The input of this SELECT statement is a decimal, and FLOOR(123.34) returns 123, which is a decimal value. You can use the diverse set of math functions provided by T-SQL to fulfill many database needs. SQL Server provided numerous mathematical functions so that you can perform the most complex calculations possible. These numerous functions are provided in most programming language environments. A compiled list of most of the important math functions is listed in Table 4.8. TABLE 4.8 MATHEMATICAL FUNCTIONS IN T-SQL Function Parameters Result ABS (Numeric expression) Returns the absolute value of a number. ACOS (Float expression) Angle (in radians) whose cosine is the specified float expression. ASIN (Float expression) Angle (in radians) whose sine is the specified float expression. ATAN (Float expression) Angle (in radians) whose tangent is the specified float expression. ATN2 (Float expression1, Returns the angle in radians float expression2) whose tangent is between the two given float expressions (also called arctangent). CEILING (Numeric expression) Returns the smallest integer greater than or equal to the numeric expression. COS (Float expression) The cosine of the specified expression. COT (Float expression) Cotangent of the specified expression. DEGREES (Numeric expression) Degrees converted from radians of the numeric expression. EXP (Float expression) Exponential value of the specified expression. FLOOR (Numeric expression) Largest integer less than or equal to the specified numeric expression. continues

For high quality website hosting services please check cheap web hosting website.

Comments are closed.