Quantcast
Channel: Sql Server – SqlHints.com
Browsing all 130 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to get User, System and All Databases name in Sql Server

How to get all Databases name in Sql Server We an write a query like below to get the list of all databases on an instance of an Sql Server. This list includes both the system databases as well as the...

View Article


Image may be NSFW.
Clik here to view.

Error Logs Maintenance in Sql Server

Sql Server Error Log files contain informational messages, warnings, critical server events, auditing information etc. And this information in the log file is very critical for analyzing any Sql Server...

View Article


Image may be NSFW.
Clik here to view.

Difference between SMALLDATETIME and DATETIME Data Types in Sql Server

Both SMALLDATETIME and DATETIME Data Types in Sql Server are used for storing Date and Time values in Sql Server. Below table summarizes some of the major difference between these two Data Types. [ALSO...

View Article

Image may be NSFW.
Clik here to view.

GO Statement in Sql Server

GO statement is used as a Batch separator in Sql Server. Batch is nothing but one or more Sql Server statements sent to the Sql Server engine as one set of statements. GO is not a Transact-SQL...

View Article

Image may be NSFW.
Clik here to view.

Sql Server Error: A fatal scripting error occurred. Incorrect syntax was...

ERROR SCENARIO We can get exception like this if we try to execute the following statement where T-SQL statement like SELECT is on the Same line as GO Statement GO SELECT 'Basavaraj Biradar' RESULT: A...

View Article


Image may be NSFW.
Clik here to view.

SLEEP Command in Sql Server

In Sql Server to PAUSE OR SLEEP OR WAIT the execution of the script for specified period of time say 10 hours or 10 minutes or 10 seconds or 10 millisecond etc we can use the WAITFOR DELAY command....

View Article

Image may be NSFW.
Clik here to view.

Sql Server Error: Incorrect time syntax in time string used with WAITFOR

ERROR SCENARIO We can get this exception if we try to execute statement like below to to SLEEP or WAIT for 90 seconds WAITFOR DELAY '00:00:90.000' RESULT: Msg 148, Level 15, State 1, Line 1 Incorrect...

View Article

Image may be NSFW.
Clik here to view.

Difference between JOIN and INNER JOIN in Sql Server

Frankly speaking, in Sql Server there is no difference between JOIN and INNER JOIN. They produce the same result and also the same performance. Let us prove with examples that there is no difference...

View Article


Image may be NSFW.
Clik here to view.

Difference between RIGHT JOIN and RIGHT OUTER JOIN in Sql Server

Frankly speaking, in Sql Server there is no difference between RIGHT JOIN and RIGHT OUTER JOIN. They produce the same result and also the same performance. Let us prove with examples that there is no...

View Article


Image may be NSFW.
Clik here to view.

Difference between LEFT JOIN and LEFT OUTER JOIN in Sql Server

Frankly speaking, in Sql Server there is no difference between LEFT JOIN and LEFT OUTER JOIN. They produce the same result and also the same performance. Let us prove with examples that there is no...

View Article

Image may be NSFW.
Clik here to view.

Difference between LEFT OUTER JOIN and RIGHT OUTER JOIN in Sql Server

This article provides a comparative analysis of the Sql Server LEFT OUTER JOIN and RIGHT OUTER JOIN with extensive list of examples. To understand the differences between Sql Server LEFT OUTER JOIN and...

View Article

SQL Server APPLY operator

APPLY operator was introduced in Sql Server 2005. The main purpose of the APPLY operator is to JOIN a Table with a Table Valued User Defined Function. The APPLY operator invokes/executes the Table...

View Article

Image may be NSFW.
Clik here to view.

CROSS APPLY in Sql Server

CROSS APPLY operator invokes/executes a Table Valued User Defined Function for each row returned by the LEFT side table expression of the CROSS APPLY operator. It returns only those rows from the LEFT...

View Article


Image may be NSFW.
Clik here to view.

OUTER APPLY in Sql Server

OUTER APPLY operator in Sql Server returns all rows from the LEFT table expression of the OUTER APPLY operator irrespective of whether it produces the corresponding result in the RIGHT table expression...

View Article

Image may be NSFW.
Clik here to view.

CREATE OR ALTER DDL Statement in Sql Server 2016 SP1

CREATE OR ALTER is one of the new Transact-Sql DDL statement supported in Sql Server 2016 SP1. This statement can be used while creating or altering the Stored Procedures, Functions, Triggers and...

View Article


Image may be NSFW.
Clik here to view.

How to Split a String in Sql Server without using a function

It is an usual practice to create a function to split the delimited sting in Sql Server, like the ones explained in the article Split delimited String. But if we are in a situation where you don’t have...

View Article

Difference between TINYINT and INT data type in Sql Server

Both TINYINT and INT are exact numeric data types, used for storing integer data. Below table lists out the major difference between TINYINT and INT Data Types. [ALSO READ] TINYINT Vs SMALLINT TINYINT...

View Article


Difference between TINYINT and SMALLINT data type in Sql Server

Both TINYINT and SMALLINT are exact numeric data types, used for storing integer value. Below table lists out the major difference between TINYINT and SMALLINT Data Types. [ALSO READ] TINYINT Vs INT...

View Article

Difference between SMALLINT and INT data type in Sql Server

Both SMALLINT and INT are exact numeric data types, used for storing integer value. Below table lists out the major difference between SMALLINT and INT Data Types. [ALSO READ] TINYINT Vs SMALLINT...

View Article

Difference between INT and BIGINT data type in Sql Server

Both INT and BIGINT are exact numeric data types, used for storing integer value. Below table lists out the major difference between INT and BIGINT Data Types. [ALSO READ] TINYINT Vs SMALLINT INT...

View Article
Browsing all 130 articles
Browse latest View live