Using data processing functions
function
SQL functions can be processed by a function, however, most common different function can not be the DBMS, which is transplanted is not high.
Use function
Text handling functions
The text all uppercase function: upper ()
eg: select vend_name, upper(vend_name) as vend_name_upcase from Vendors orderby vend_name;
Commonly used text processing functions
left () Returns the left of the string of characters
right () returns a string of characters to the right
lengtth () Returns a string length
lower () will be converted to lower case string
upper () convert a string to upper case
LTRIM () remove the string of spaces left
RTRIM () to remove the string on the right spaces
soundex () Returns a string value soundex
Use soundex function
eg: select cust_name, cust_contact from customers where soundex (cust_contact) = soundex ( 'michael green'); and michael green line pronunciation similar search.
The date and time handling functions
In the SQL server is a function of time datepart (yy, '2019-09-04')
oracle time function used TO_DATE () to change the format or use to_char time.
MySQL may be used year () function and the like.
Numerical handler
Common numerical function
abs () returns the absolute value of a number
cos () returns a cosine of an angle
exp () Returns the value of the exponent of a number
pi () pi
sin () Returns the value of a sine of an angle
sqrt () returns the square root of a number
Tan () returns the angle of the tangent