You are here
Home > Sql server > Sql server 2016

SQL:String Functions

String Functions In last post we discuss about UPPER(), LOWER(), REVERSE(), FORMATE(), REPLACE() ,CHARINDEX() string functions. And today we discuss remaining string functions. In this entire post for examples we use below table. Table: persons p_id firstname lastname city 1 Amisha Patel Anand 2 Bina Patel Baroda 3 Tina Doyle v.v.nagar 4 Riya Patel Anand 5 Nikunj Patel NULL LEN(): The LEN() function return the length of input string in terms of number of characters excluding the trailing

SQL: String Functions

String Functions In last post we discuss about CONCATE(), LEFT(), RIGHT() string functions. And today we discuss remaining string functions. In this entire post for examples we use below table. Table: persons p_id firstname lastname city 1 Amisha Patel Anand 2 Bina Patel Baroda 3 Tina Doyle v.v.nagar 4 Riya Patel Anand 5 Nikunj Patel NULL UPPER(): The UPPER() string function returns an expression, with all letters in uppercase. Syntax: UPPER(expression) Example: select UPPER(firstname)as uppercase_name from persons; output: uppercase_name AMISHA BINA TINA RIYA NIKUNJ LOWER(): The LOWER() string function returns an

SQL :String Functions

String Functions In this post we will discuss String functions in SQL. SQL support many functions for String manipulations like CONCATE(), LEFT(), RIGHT() etc. In this entire post for examples we use below table. Table: persons p_id firstname lastname city 1 Amisha Patel Anand 2 Bina Patel Baroda 3 Tina Doyle v.v.nagar 4 Riya Patel Anand 5 Nikunj Patel NULL Concatenation: T-SQL support two ways for string concatenation. Concatenation using ‘+’ operator: For concatenation of string we use +

SQL: System functions

System functions In this post we will discuss System functions, it returns information about various system parameters. @@ROWCOUNT @@ROWCOUNT function returns number of rows affected by the last executed statement. It is used to check if the previous statement affects any rows by checking the function’s result is zero or greater than

SQL:OUTPUT OPTION

OUTPUT OPTION In this post we will discuss about OUTPUT option. T-SQL supports an OUTPUT clause for modification statements, which we can use to return information from modified rows. We can use output option for purposes like auditing, archiving and others. We can use OUTPUT clause with insert, update, delete statements.

SQL: Aggregate Functions

SQL: Aggregate Functions In this post we will discuss aggregate functions. T-SQL support SUM, MIN, MAX, AVG, COUNT, SQRT, POWER and other aggregate functions. It ignores NULL inputs when applied to an expression. Use DISTINCT clause to remove duplicate values. In the group query the aggregate functions is applied per group,

SQL:Logical Functions

Logical Functions In this post we will discuss logical functions like IIF, CHOOSE, ISNUMERIC. The output of these functions are determine by comparative logic. These functions simplify migrations from Microsoft access platforms and it is nonstandard T-SQL functions. IIF() IIF() returns one of two values, depending on whether the boolean expression evaluates

Top