Dofactory.com
Dofactory.com
Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

SQL System Functions

SQL Server offers numerous built-in system functions.

Many of these perform operations and conversions on values.

Others support logic and return information about data values.

Example

#

This function parses string values and converts these to a different data types.

SELECT PARSE('1859' AS INT) AS '1859',
       PARSE('1859' AS DECIMAL(10, 2)) AS '1859.',
       PARSE('10/15/21' AS DATETIME) AS '10/15/21',
       PARSE('10/15/21 08:15 PM' AS DATETIME2) AS '10/15/21 08:15 PM'
Result:  1 record
1859 1859 10/15/21 10/15/21 08:15 PM
1859 1859.00 2021-10-15 00:00:00.000 2021-10-15 20:15:00.0000000

System Functions

These are the built-in system functions in SQL Server.
Click on a function for more details.

Function Description
CAST CAST Function
CONVERT CONVERT Function
CHOOSE CHOOSE Function
ISNULL ISNULL Function
ISNUMERIC ISNUMERIC Function
IIF IIF Function
NULLIF NULLIF Function
PARSE PARSE Function
TRY_CAST TRY_CAST Function
TRY_CONVERT TRY_CONVERT Function
TRY_PARSE TRY_PARSE Function

You may also like



Last updated on Dec 21, 2023

Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.