T-SQL

Esat Erkec
Listing temporary tables in tempdb database

How to drop temp tables in SQL Server

March 23, 2020 by

Temporary tables, also known as temp tables, are widely used by the database administrators and developers. However, it may be necessary to drop the temp table before creating it. It is a common practice to check whether the temporary table exists or not exists. So, we can eliminate the “There is already an object named ‘#temptablename’ in the database” error during the temporary table creation.

Read more »
Ahmad Yaseen
Max() function example 7

SQL Server MAX() aggregate function

March 19, 2020 by

SQL Server provides us with several aggregate functions that can be used to perform different types of calculations on a set of values, and return a single value that summarized the input data set. These SQL Server aggregate functions include AVG(), COUNT(), SUM(), MIN() and MAX().

Read more »
Jignesh Raiyani
Monitor Transaction Log

Monitor Transaction Log shipping using T-SQL and SSMS

March 10, 2020 by

Database Administrators are vigilant on the backup and restore processes and use the Monitor Transaction log for the same. SQL Server Transaction Log shipping’s prime steps are Transaction Log backup, copy and restore. The answer to solving Disaster Recovery (DR) at the database level can be achieved by SQL Server Transaction Log shipping.

Read more »
Bojan Petrovic
An executed CREATE VIEW SQL script showing data returned only for the SELECT statement in SSMS

CREATE VIEW SQL: Modifying views in SQL Server

March 5, 2020 by

In my previous article, we looked at how to use the CREATE VIEW SQL statement to create views. In this one, we are moving on and focusing on how to modify views. We will continue using examples on a sample database and data created in the first write-up so in order to follow along, head over and read the Creating views in SQL Server part before starting with this one.

Read more »
Emil Drkusic
The data model we'll use to explain user-defined functions

Learn SQL: User-Defined Functions

February 25, 2020 by

You can create several user-defined objects in a database. One of these is definitely user-defined functions. When used as intended, they are a very powerful tool in databases. In today’s article, we’ll see how to create, change and remove them from the database, as well as how to use them. So, let’s dive into the matter.

Read more »
Rajendra Gupta
Sample notebook

Learn Jupyter Notebooks for SQL Server

February 25, 2020 by

Introduction

The Jupyter notebook is a powerful and interactive tool that supports various programming languages such as Python, R, Julia. This open-source utility is popular among data scientists and engineers. This notebook integrates both code and text in a document that allows you to execute code, view visualization, solve mathematical equations.

Read more »