Category: Stored Procedures
Hello to everyone, In this article, I will give information about the procedure that writes to the text file in SQL Server. In SQL Server, in some cases you may want to write to the file using SQL Server. You can easily do this using the procedure below. First you...
Hello to everyone, In this article, I will provide information on how to rename a table name in SQL Server. In SQL Server you may want to rename the table name in some cases. You can easily do this using the code below. exec sp_rename ‘dbo.Categories’, ‘NewCategoryName’ I made my...
Hello to everyone, In this article, I will try to give you information about calling a procedure from within a function in SQL Server. Many of you started reading the article saying that such a thing would not happen, or you started reading the article wondering how it really is....
Hello to everyone, In this article, I will give you information about the procedure that runs dynamic queries in SQL Server. I don’t know if there is a need for such a thing in SQL Server, but I tried to write it saying that maybe I will need it in...
Hello to everyone, In this article, I will talk about how to find tables related to Procedures in SQL Server. You can also do this using the code below. SELECT obj.[name] AS ‘ProcedureName’, sed.referenced_entity_name AS ‘TableName’ FROM sys.objects AS obj INNER JOIN sys.sql_expression_dependencies AS sed ON obj.object_id = sed.referencing_id WHERE...
Hello to everyone, In this article, I will talk about how to find the tables used by Stored procedures in SQL Server. You can easily do this using the code below. DECLARE @temptableforSP TABLE ( spName VARCHAR(100), tableName NVARCHAR(100) ); DECLARE @SP_Name AS NVARCHAR(100); DECLARE @SP_Cursor AS CURSOR; SET @SP_Cursor...