Built in Functions:

Sql server provides predefined function ,which are collectively called as built in function
Bult in fucnction are classified into 
1)Scalar function.
2)aggregate function.
3)Ranking Function.

1)Scaler Function:-
           It is function are built in function that can be operate on a single value at a time,scaler function are classified into numeric function, string function,Date Function and conversion function.

1)Numeric Function:-
              The operate on numeric type of data,numeric function avaliabli in sql server.

a)abs(n):-
    absolute value of n

select abs(-76.54)

o/p-76.54

b)radians(n):-
 used to convert given n .

select RADIANS (30.00)

o/p-
      0.523598775598298790
C)Degree(n):-
   Used to convert given ‘n’ in radians to degree.

select DEGREES (0.5235)
O/p-
29.994340575098594000

d) Sin(n):-
 used  to get trigonometry sin value of given in the  radians.

select sin(radians(30.00))                            sin(30)=1/2=>0.5

O/P
0.5
e)Cos(n) :-
used  to get trigonometry Cos value of given in the  radians.

select Cos(radians(30.00))

o/p-
0.866025403784439

f)Tan(n):-
used  to get trigonometry tan value of given in the  radians.

select tan(radians(30.00))

o/p-
0.577350269189626

g)Power(m,n):-
to get m to power n.

select POWER(5,3)

o/p-
  125
h)Square(n):-
 to get n of square.

select SQUARE (25)

O/p-
625
i)Sqrt(n):-
       for square root

select SQRT (625)

O/p-
25
j)Floor(n):-
    used to round the given ‘n’ nearest int less than or equal  n.

select FLOOR(7.54)

O/P-
7
k)celling(n):-
  used to round the given ‘n’ to nearest integer greather than or equal ‘n’.

select CEILING (7.54)

o/p-
8
l)Round(n,p[,+t):-
used to round the given ‘n’  to ‘p’ decimal  places when the 3rd argument ‘t’ is specifying as 1 than n values will be truncate to p decimal places.

select ROUND(54.53641,2)
o/p-
54.54000
M)Log(n):-
 Used to get natural logarithm of given ‘n’

select LOG (100)

o/p-
4.60517018598809    
   
n)log10(n):-
used to get base 10 logrithm value of given ‘n’.

select LOG10(100)

o/p-
2.

o)Sign(n):-
this function is used to determine whether the given ‘n’ is positive or negative or zero.
When the given ‘n’ values is positive then it return(+1),when it is negative then return (1),and when it is zero(0) then return (0).

select SIGN(0)

o/p-

0

p)Exp(n):-
used to get expontial value of given no .

select EXP(3)

o/p-
20.0855369231877.
Q)pi():-
Return the constant pi value.
select pi()

o/p-

3.14159265358979






  If you have any query  then frankly  leave mail me dotnetbyabhipatil@gmail.com

For more article  visit my blog
 http://dotnetbyabhipatil.blogspot.in




               

0 comments:

Post a Comment

Rate me

Free Rating Code
 
Top
How to Become Author of TechFusion || write your suggestion and idea on comment box, we try to implement it.