MSSQL Query Blog
Creating a Recursive Menu in SQL Server
Hello everyone. In this article, I will try to give information about creating a Recursive Menu in SQL Server. You can create simple or advanced nested menus in SQL Server. First, let’s create a table called “Menu”. CREATE TABLE Menu ( MenuID INT PRIMARY KEY ,MenuName NVARCHAR(50) ,ParentMenuID INT NULL...
Formatting an IBAN Number in SQL Server
Hello everyone. In this article, I will give information about formatting an IBAN number in SQL Server. In SQL Server, in some cases, you may want to format the IBAN number. You can easily do this using the code below. DECLARE @iban VARCHAR(50) = ‘TR320010009999901234567890’; SELECT CONCAT(SUBSTRING(@iban, 1, 2), ‘...
What are the Differences Between EXISTS and NOT EXISTS in SQL Server?
Hello everyone. In this article, I will talk about the differences between EXISTS and NOT EXISTS in SQL Server. The differences between EXISTS and NOT EXISTS in SQL Server are as follows. In SQL Server, EXISTS and NOT EXISTS are two different operators used to test whether the condition specified...
What are the Differences Between Temporary Table and Table Variable in SQL Server?
Hello everyone, In this article I will talk about the differences between Temporary Table and Table variable in SQL Server. The differences between Temporary Table and Table variable in SQL Server are as follows. The names of Temporary tables begin with the ‘#’ sign and are defined as a temporary...