Category: Stored Procedures
SQL Server Procedures articles and Procedure code examples
Hello everyone. In this article, I will try to give information about the customized PRINT procedure in SQL Server. In SQL Server, the PRINT statement prints up to 4000 characters. So what will you do if the content of the dynamic queries you write is longer than 4000 characters? In...
Hello everyone. In this article, I will try to give information about why you should not add “sp_” prefix in front of your Stored Procedures in SQL Server. Most people tend to prefix “sp_” to the name of the Stored Procedure when creating a Stored Procedure in SQL Server. There...
Hello everyone, In this article, I will share information about the procedure for outputting tables in HTML format in SQL Server In SQL Server, in some cases you may want to output the tables in HTML format. You can easily do this by using the following procedure. CREATE PROCEDURE [dbo].[SqlTableToHtml]...
Hello everyone, In this article, I will give you information about when to use the sp_refreshview procedure in SQL Server. The sp_refreshview procedure in SQL Server is used to update the metadata of a view in the database. This can be necessary in certain situations, such as when a view...
Hello everyone, In this article, I will try to give information about learning the physical size of a table in SQL Server. In SQL Server, in some cases you may want to know the physical size of a table. We use the sp_spaceused procedure for this operation. We run our...
Hello everyone, In this article, I will try to give information about the advantages of using Procedures in SQL Server. Procedures are pre-written code blocks that can be stored and executed in a SQL Server database. Here are some advantages of using procedures in SQL Server: Reusability: Procedures can be...
Hello everyone, In this article, I will try to give information about System Procedures, which are widely used in SQL Server. There are many system procedures available in SQL Server, but some of the commonly used ones are: sp_help: This system procedure provides information about a database object, such as...
Hello to everyone, In this article, I will talk about the difference between stored procedures and functions in SQL Server. Stored procedures are sql statements that are stored by the database and do not need to be recompiled after the first compilation. Functions are sql codes that can return any...