Category: Function Reference

  •  Datatype Functions

    The Data Type functions in SQL are a scalar functions that returns information about various data type values. Following are the SQL date type functions − Sr.No. Function & Description 1 DATELENGTH()Returns the number of bytes used to represent any expression and also counts the leading and trailing spaces of the expression. 2 IDENT_CURRENT()Returns the…

  • Conversion Functions

    In SQL, the conversion functions are used to convert a value from one datatype to another. Generally, the form of the function names follows the convention datatype TO datatype. The first datatype is the input datatype. The second datatype is the output datatype. List of Functions Following is a list of functions available in the SQL server…

  • JSON Functions

    JSON (JavaScript Object Notation) is a simple format for exchanging data. It is self-descriptive, understandable in any language, and irrespective of language. It serves as an XML substitute. JSON is currently a popular data transfer standard. The data that returned by modern services is JSON text. SQL Server JSON is the need for data developers…

  • Cursor Functions

    In SQL Server, a cursor is a database object that enables us to retrieve and modify data from individual rows one at a time. Nothing more than a row pointer is what a cursor actually is. It always goes together with a SELECT statement. Typically, it consists of a set of SQL statements that iterate…

  •  Logical Functions

    SQL logical functions are used primarily for checking (or testing) the truth of some conditions. A logical function performs a logical operation or comparison on objects and expressions and returns a boolean value − Sr.No. Function & Description 1 CHOSE()Returns a item from the list at the specified index value. 2 IIF()Returns a one of two values,…

  • Statistical Functions

    SQL server Statistical functions work on SQL server tables and views and exploit all database parallelism, scalability, user privileges and security schemes. Hence the SQL statistical functions can be included and exposed within SQL queries − Sr.No. Function & Description 1 @@CONNECTIONS()Returns number of attempted connections. 2 @@CPU_BUSY()Returns amount of time, SQL server spent on an active…

  • Text & Image functions

    SQL Text and Image functions operate on text and image data. The text and image functions are − Sr.No. Function & Description 1 TEXTPTR()Returns the pointer value of the text or images. 2 TEXTVALID()Returns an integer value(1 for valid, 0 for non-valid).

  • Numeric Functions

    SQL numeric functions are used primarily for numeric manipulation and/or mathematical calculations. The following table details the numeric functions − Sr.No. Function & Description 1 ABS()Returns the absolute value of numeric expression. 2 ACOS()Returns the arccosine of numeric expression. Returns NULL if the value is not in the range -1 to 1. 3 ASIN()Returns the…

  • Aggregate Functions

    In general, aggregation is a consideration of a collection of objects that are bound together as a single entity. SQL provides a set of aggregate functions that perform operations on all the entities of the column of a table considering them as a single unit. Following are the SQL aggregate functions − Sr.No. Function &…

  • String Functions

    SQL string functions are used primarily for string manipulation. The following table details the important string functions − Sr.No. Function & Description 1 ASCII()Returns numeric value of left-most character 2 CHAR()Returns the character for each integer passed 3 CHARINDEX()Returns the position of a substring within the given string. 4 CONCAT_WS()Returns concatenate with separator 5 CONCAT()Returns…