Category Archives: SQL Functions

SQL Functions

Max() function in SQL Server

Max():- This function gives the maximum value of the selected column Syntax:- Select Max (col1) from table_name In this article, we are going to use the following table for the examples:- CREATE TABLE [dbo]. [Employee]( [Empid] [Int] IDENTITY (1, 1) … Continue reading

Posted in SQL Functions, SQL Server | Tagged | 26 Comments

RTRIM() function in SQL Server

RTRIM():-This function is used to get the string after the removal of all trailing blanks. Syntax:- RTRIM ( character_expression ) For example:- Select RTRIM(‘Vivek Johari  ‘) Result:- Vivek Johari (without blank spaces on Right side)

Posted in SQL Functions, SQL Server | Tagged | Leave a comment

SUM() function in SQL Server

Sum():- This function is used to get the sum of values of the specified numeric column.  Syntax:-  Select Sum (column_name) from tablename Example:- In this article, we are going to use the following table for the examples:- CREATE TABLE [dbo]. … Continue reading

Posted in SQL Functions, SQL Server | Tagged | 31 Comments

Round() function in SQL Server

Round():-This function is used to round a numeric field to the number of decimals specified. Syntax:-     ROUND ( numeric_expression , length [ ,function ] numeric_expression :-Expression of the exact numeric or approximate numeric data type category, except for the … Continue reading

Posted in SQL Functions, SQL Server | Tagged | 31 Comments

Like() function in SQL Server

Like:- This operator is used in a WHERE clause to search for a specific pattern in the values of the column. In this article, we are going to use the following table for the examples:- CREATE TABLE [dbo]. [Employee]([Empid] [Int] … Continue reading

Posted in SQL Functions, SQL Server | Tagged | 31 Comments

SQL Server Functions- An Introduction

SQL FUNCTION: – Function in a database can be defined as the code segment consisting of a logical group of SQL statements which takes some input arguments (if required), run in a sequential order and returns the output either in … Continue reading

Posted in Most Imp SQL Concepts, SQL Functions, SQL Server | Tagged , , | 31 Comments

Sql Server- Difference between Stored Procedure and Function

In Sql Server, both functions and stored procedures can be defined as the logically grouping of Sql statements formed to complete a task, but still there are many differences between Stored procedure and Functions. These differences can be summarized as … Continue reading

Posted in Imp SQL Difference, Interview Questions, SQL Functions, SQL Server, SQL Stored Procedure | Tagged | 6 Comments