T-SQL – Numeric Functions
MS SQL Server numeric functions can be applied to numeric data and will return numeric data. Following is the list of Numeric functions with examples. ABS() The absolute value will…
MS SQL Server numeric functions can be applied to numeric data and will return numeric data. Following is the list of Numeric functions with examples. ABS() The absolute value will…
Following is the list of date functions in MS SQL Server. GETDATE() It will return the current date along with time. Syntax The syntax for the above function − GETDATE()…
MS SQL Server String functions can be applied on string value or will return string value or numeric data. Following is the list of String functions with examples. ASCII() Ascii…
SQL string functions are used primarily for string manipulation. The following table details the important string functions − Sr.No.Function & Description1ASCII() Returns numeric value of left-most character2BIN() Returns a string…
SQL numeric functions are used primarily for numeric manipulation and/or mathematical calculations. The following table details the numeric functions − Sr.No.Function & Description1ABS() Returns the absolute value of the numeric…
SQL CONCAT function is used to concatenate two strings to form a single string. Try out the following example − SQL> SELECT CONCAT('FIRST ', 'SECOND'); +----------------------------+ | CONCAT('FIRST ', 'SECOND') | +----------------------------+…
SQL has a RAND function that can be invoked to produce random numbers between 0 and 1 − SQL> SELECT RAND( ), RAND( ), RAND( ); +------------------+-----------------+------------------+ | RAND( ) | RAND(…
SQL SQRT function is used to find out the square root of any number. You can use a SELECT statement to find out the square root of any number as follows −…
SQL SUM function is used to find out the sum of a field in various records. To understand SUM function, consider an employee_tbl table, which is having the following records − SQL> SELECT * FROM employee_tbl;…
SQL AVG function is used to find out the average of a field in various records. To understand AVG function, consider an employee_tbl table, which is having the following records − SQL> SELECT * FROM employee_tbl;…