<< < 35 36 37 38 39 40 41 42 43 44 45 > >>   ∑:1243  Sort:Rank

"DROP PROCEDURE" - Dropping an Existing Procedure in SQL Server
How To Drop an Existing Stored Procedure in SQL Server Transact-SQL? If you have an existing procedure that you don't want to use it anymore, you should delete it from the SQL Server by using the "DROP PROCEDURE" statement as shown in the tutorial example below: USE FyiCenterData; GO DROP PROCEDURE ...
2017-01-05, 1455🔥, 0💬

sys.sql_modules - Getting Stored Procedure Definitions Back in SQL Server
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the definition of an existing stored procedure back from the SQL Server, you can use the system view called sys.sql_modules, which stores definitions of views and stored procedures. The sys.sql_modules h...
2017-01-05, 5619🔥, 0💬

Ending Stored Procedures Properly in SQL Server
How To End a Stored Procedure Properly in SQL Server Transact-SQL? Where the end of the "CREATE PROCEDURE" statement structure? The answer is simple, the end of the statement batch. Even if you are using a "BEGIN ... END" statement block, the stored procedure structure is not going to end at the end...
2017-01-05, 4974🔥, 0💬

Generating CREATE PROCEDURE Scripts on Existing Stored Procedures in SQL Server
How To Generate CREATE PROCEDURE Script on an Existing Stored Procedure in SQL Server Transact-SQL? If you want to know how an existing stored procedure was created, you can use SQL Server Management Studio to automatically generate a "CREATE PROCEDURE" script The following tutorial shows you how to...
2017-01-05, 2037🔥, 0💬

"ALTER PROCEDURE" - Modifying Existing Stored Procedures in SQL Server
How To Modify an Existing Stored Procedure in SQL Server Transact-SQL? If you find a mistake in an existing stored procedure previously created, you can drop (delete) it and create it again correctly. But dropping a stored procedure may affect other database objects who are depending on this stored ...
2017-01-05, 1711🔥, 0💬

Creating Stored Procedures with Parameters in SQL Server
How To Create Stored Procedures with Parameters in SQL Server Transact-SQL? Very often, you need to create a stored procedure with one or more parameters. You only supply values to those parameters at the time of executing the stored procedure. Stored procedures with parameters can be created with t...
2017-01-05, 1376🔥, 0💬

Using User Defined Functions in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Using User Defined Functions in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Using User Defined Functions in SQL Server Transact-SQL. Clear answers are provided wit...
2016-12-28, 2423🔥, 0💬

OUTPUT - Defining Output Parameters in Stored Procedures in SQL Server
How To Define Output Parameters in Stored Procedures in SQL Server Transact-SQL? Sometime a stored procedure not only want to take input values from the calling statement batch, but it also want to send output values back to the calling statement batch. This can be done by defining output parameters...
2016-12-28, 1943🔥, 0💬

Passing Values to Stored Procedure Parameters in SQL Server
How To Provide Values to Stored Procedure Parameters in SQL Server Transact-SQL? If a stored procedure is created with parameters, you need pass values to those parameters when calling the stored procedure with one of two formats listed below: -- Passing values only EXEC procedure_name value_1, valu...
2016-12-28, 1880🔥, 0💬

Passing Name-Value Pairs as Parameters in SQL Server
What Are the Advantages of Passing Name-Value Pairs as Parameters in SQL Server Transact-SQL? When calling a stored procedure defined with parameters, you can pass values to those parameters in two ways: Passing only values in the same order as parameters defined in the stored procedure. Passing nam...
2016-12-28, 1631🔥, 0💬

Passing Expressions to Stored Procedure Parameters in SQL Server
Can You Pass Expressions to Stored Procedure Parameters in SQL Server Transact-SQL? Can you pass expressions to stored procedure parameters? The answer is no. When executing stored procedures, all input values must be entered as data literals, which can be specified within single quotes ('), or with...
2016-12-28, 1594🔥, 0💬

OUTPUT - Receiving Output Values from Stored Procedures in SQL Server
How To Receive Output Values from Stored Procedures in SQL Server Transact-SQL? If an output parameter is defined in a stored procedure, the execution statement must provide a variable to receive the output value in the format: "@variable_name OUTPUT" or "@parameter_name = @variable_name OUTPUT". Th...
2016-12-28, 1478🔥, 0💬

Testing Local Temporary Stored Procedures in SQL Server
Can Another User Execute Your Local Temporary Stored Procedures in SQL Server Transact-SQL? Can another user execute your local temporary stored procedures? The answer is no. To test this out, continue with the exercise from the previous tutorial. Keep that user session running and open a new client...
2016-12-28, 1445🔥, 0💬

Creating Local Temporary Stored Procedures in SQL Server
How To Create a Local Temporary Stored Procedure in SQL Server Transact-SQL? A local temporary stored procedure is a special stored procedure that: Is created like a normal (permanent) stored procedure with the name prefixed with a number sign (#). Are only valid in the same client session where it ...
2016-12-28, 1408🔥, 0💬

What Are User Defined Functions in SQL Server
What Are User Defined Functions in SQL Server Transact-SQL? A user defined function is a collection of Transact-SQL statements that stored in the SQL Server. A user defined function will return data when executed. A user defined function works in the same way as a system function. It can be used as ...
2016-12-28, 1380🔥, 0💬

Providing Default Values to Procedure Parameters in SQL Server
How To Provide Default Values to Stored Procedure Parameters in SQL Server Transact-SQL? If you add a parameter when creating a stored procedure, you can provide a default value so that the execution statement is not required to pass input value to this parameter. To provide a default value to a par...
2016-12-28, 1366🔥, 0💬

sys.objects - Listing All User Defined Functions in SQL Server
How To List All User Defined Functions in the Current Database in SQL Server Transact-SQL? If you want to see a list of all user defined functions in your current database, you can use the system view, sys.objects as shown in this tutorial exercise: USE FyiCenterData; GO -- Number of Sundays in a gi...
2016-12-24, 2668🔥, 0💬

"CREATE FUNCTION" - Creating User Defined Functions in SQL Server
How To Create a Simple User Defined Function in SQL Server Transact-SQL? If you want to create a simple user defined function, you can use the "CREATE FUNCTION" command with a statement block in a simple format as shown in below: CREATE FUNCTION function_name() RETURNS data_type AS BEGIN statement_1...
2016-12-24, 1622🔥, 0💬

Differences between Functions and Stored Procedures in SQL Server
What Are the Differences between User Defined Functions and Stored Procedures in SQL Server Transact-SQL? Differences between user defined functions and stored procedures are: Stored procedures does not return any data and they can not be used in expressions. User defined functions does return data ...
2016-12-24, 1502🔥, 0💬

"DROP FUNCTION" - Dropping an Existing User Defined Function in SQL Server
How To Drop an Existing User Defined Function in SQL Server Transact-SQL? If you have an existing user defined function that you don't want to use it anymore, you should delete it from the SQL Server by using the "DROP FUNCTION" statement as shown in the tutorial example below: USE FyiCenterData; GO...
2016-12-24, 1346🔥, 0💬

Using User Defined Functions in Expressions in SQL Server
How To Use User Defined Functions in Expressions in SQL Server Transact-SQL? An user defined function must return a value, which can be used in any expression as long as the return value data type matches the expression. To execute a user defined function and use its return value in an expression, y...
2016-12-24, 1255🔥, 0💬

sys.sql_modules - Getting User Defined Function Definitions Back in SQL Server
How To Get the Definition of a User Defined Function Back in SQL Server Transact-SQL? If you want get the definition of an existing user defined function back from the SQL Server, you can use the system view called sys.sql_modules, which stores definitions of functions, stored procedures, and views....
2016-12-18, 3102🔥, 0💬

Generating CREATE FUNCTION Scripts on Existing Functions in SQL Server
How To Generate CREATE FUNCTION Script on an Existing Function in SQL Server Transact-SQL? If you want to know how an existing user defined function was created, you can use SQL Server Management Studio to automatically generate a "CREATE FUNCTION" script The following tutorial shows you how to do t...
2016-12-18, 1762🔥, 0💬

Passing Expressions to Function Parameters in SQL Server
Can You Pass Expressions to Function Parameters in SQL Server Transact-SQL? Can you pass expressions to stored procedure parameters? The answer is yes. When executing functions, input values can be written as expressions. But the resulting value data type must match the parameter. The tutorial exerc...
2016-12-18, 1679🔥, 0💬

<< < 35 36 37 38 39 40 41 42 43 44 45 > >>   ∑:1243  Sort:Rank