You are here
Home > 2018

Date and Time Functions in sql

Date and Time Functions

Date and Time Functions T-SQL supports a many date and time functions that allow you to manipulate your date and time data. Current date and time T-SQL supports built- in functions like GETDATE, GETUTCDATE, CURRENT_TIMESTAMP, SYSDATETIME, SYSUTCDATETIME and SYSDATETIMEOFFSET that returns the current date and time. CURRENT_TIMESTAMP: Returns the current date and

BETWEEN Operator in sql

BETWEEN Operator BETWEEN operator is used to select data that is within a range of values. It allows the selection of rows that contain values within a specified lower and upper limit. It can be used in where clause with a SELECT, DELETE, INSERT, or UPDATE statement. Syntax: SELECT column1, column2,….,

Character Functions in sql

Character Functions T-SQL supports many built-in functions. Concatenation T-SQL supports two ways to concatenate strings. one with the CONCAT function and another with the plus (+) operator. Example: select CONCAT('abc', 'xyz'); Output: abcxyz Example: select LEFT('abcxyz',2) + RIGHT('abcxyz',2); Output: abyz   Substring extraction and position                                T-SQL supports built-in functions like SUBSTRING, LEFT,

SQL Server Functions in sql

SQL Server Functions T-SQL supports many built-in functions. Scalar function returns a single value. Table-valued function returns a table result.  Conversion functions SQL supports number of functions that can convert a source expression to a target data type. SQL Server conversion functions are CAST and CONVERT. CAST: It converts an expression from one