MSSQL Query Blog

Connecting to SQL Server Using HeidiSQL

Hello to everyone, In this article, I will try to give information about connecting to SQL Server using HeidiSQL. First, let’s talk about what HeidiSQL is. HeidiSQL; It is a free and open source client for MySQL (versions such as MariaDB and Percona Server), as well as Microsoft SQL Server...

List All Views in SQL Server

Hello to everyone, In SQL Server, in some cases, you may need to list all views. You can easily do this with the help of the code below. SELECT SCHEMA_NAME(schema_id) AS schema_name, name AS view_name, OBJECTPROPERTYEX(object_id, ‘IsIndexed’) AS IsIndexed, OBJECTPROPERTYEX(object_id, ‘IsIndexable’) AS IsIndexable FROM sys.views; When you run the above...

Finding When Backup Was Restored in SQL Server

Hello to everyone, In this article, I will talk about how to find the time when the backup was restored in SQL Server. In some cases in SQL Server, you may want to know when the backup was restored. You can easily do this using the code below. DECLARE @DB...

Printing Your Name as a Triangle in SQL Server

Hello to everyone, In this article, I will talk about how you can print your name as a triangle in SQL Server. In SQL Server, such examples will improve your algorithm logic. You can easily do this by using the code below. DECLARE @i INT, @word VARCHAR(20); SET @i =...

Function Checking Prime Number in SQL Server

Hello to everyone, In this article, I will try to give information about the function that checks the prime number in SQL Server. In SQL Server, in some cases, you may want to check if the number you have is a prime number. You can easily do this using the...

Procedure to Show Script of All Triggers in SQL Server

Hello to everyone, In this article, I will give information about the procedure that show the script of all triggers in SQL Server. In some cases, you may want to script all triggers in SQL Server. You can do this easily with the help of the procedure below. –Creating the...

Enable All Triggers in SQL Server

Hello to everyone, In this article, I will give information about how to enable All Triggers in SQL Server. In SQL Server, in some cases, you may want to enable all triggers. You can do this easily with the help of the code below. –Enable All Triggers in SQL Server...

Disable All Triggers in SQL Server

Hello to everyone, In this article, I will give information about how to disable All Triggers in SQL Server. In SQL Server, in some cases, you may want to disable all triggers. You can do this easily with the help of the code below. –Disable All Triggers in SQL Server...

Don`t copy text!