SQL SERVER Archive

Temporary Tables and Table variables in SQL

Temporary Tables and Table variables in SQL Hello Reader, In this article, I will explain the difference between temporary tables and table variables in SQL server. Temporary tables and table variables both have their own pros and cons. We need to decide which one to use and when. Let’s Compile the Difference List ⇒ Table variable

10 SQL Server Shortcuts You Must Know

10 SQL Server Shortcuts You Must Know Howdy Reader, SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications which may run either on the same computer or on another computer

Difference between varchar and varchar(max)

Difference between varchar and varchar(max) Hello Readers, The purpose of this post is to make it clear what to use and when with respect to varchar data type in SQL Server. Varchar(max) was introduced in SQL Server 2005 version. Few years back, I wasn’t clear about the Difference between varchar and varcharmax. It was always confusing for me

How to exclude Saturday and Sunday using SQL Query?

How to exclude Saturday and Sunday using SQL query? Howdy Reader, While working with one of the application, I came across a requirement to get records from database using SQL query by excluding weekend’s data. So I thought of sharing it with you guys. For excluding weekend’s data we need to write the query as: [crayon-58fd030620c58339950222/] Here @@DATEFIRST

SQL Server Languages – DML, DDL, DCL and TCL

SQL Server Languages – DML, DDL, DCL and TCL Howdy Readers, A heartily welcome to the blog! This is my first post in SQL Server category. Hope you will enjoy reading. There are mainly 4 types of language statements or commands in SQL Server. DML DML is abbreviation of Data Manipulation Language. It is used