Aggregate Functions in SQL Server

T-SQL

Let’s create a SampleDB database fist with SQL Management Studio. Now create a table in SampleDB.

Insert Sample Data:

Aggregate Functions in SQL Server

COUNT (Transact-SQL)

Returns the number of items in a group. COUNT always returns an int data type value. Continue reading “Aggregate Functions in SQL Server”

Table Variables

T-SQL

Temp variable can be created like this:

Table variable is always useful for less data. If the result set returns a large number of records, we need to go for temp table.

Views In SQL Server

T-SQL

Let’s create a SampleDB database fist with SQL Management Studio. Now we have to create a table in SampleDB.

Let’s Name the table as – Employee

Continue reading “Views In SQL Server”

12