<< < 6 7 8 9 10 11 12 13 14 15 16 > >>   ∑:509  Sort:Rank

WHILE ... Loops in SQL Server Transact-SQL
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can use WHILE ... statements to execute statements in loops in Transact-SQL using these syntaxes: -- Loop with a single statement WHILE condition statement -- Loop with a statement block WHILE condition --...
2017-01-11, 4112🔥, 0💬

Conditional Statements and Loops in SQL Server in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com team on Conditional Statements and Loops in SQL Server Transact-SQL. Clear answers are provided...
2017-01-11, 3706🔥, 0💬

IF ... ELSE Statement in SQL Server Transact-SQL
How to execute statements under given conditions in SQL Server Transact-SQL? How to use IF ... ELSE statements? You can use IF ... ELSE statements to execute statements under given conditions in Transact-SQL using these syntaxes: IF condition statement_1 IF condition statement_1 ELSE statement_2 IF ...
2017-01-11, 3454🔥, 0💬

BEGIN ... END Statement Blocks in SQL Server Transact-SQL
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into a statement block with BEGIN and END key words in Transact-SQL using these syntaxes BEGIN statement_1 statement_2 ... END Statement blocks are mainly used with logical conditions and control-of-flow ...
2017-01-11, 3128🔥, 0💬

CONTINUE to Next Loop Iteration in SQL Server Transact-SQL
How to continue to the next iteration of a WHILE loop in SQL Server Transact-SQL? How to use CONTINUE statements? You can use the CONTINUE statement to continue to the next iteration of a WHILE loop by skipping the rest of statement block of the current iteration using this syntax: WHILE condition B...
2017-01-11, 11757🔥, 0💬

BREAK of Loop Statement in SQL Server Transact-SQL
How to break a WHILE look statement in SQL Server Transact-SQL? How to use BREAK statements? You can use the BREAK statement to break a WHILE loop inside the statement block in Transact-SQL using this syntax: WHILE condition BEGIN statement_1 statement_2 ... BREAK; statement_n ... END When a BREAK s...
2017-01-11, 2329🔥, 0💬

Using Stored Procedures in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Using Stored Procedures in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Using Stored Procedures in SQL Server Transact-SQL. Clear answers are provided with tutorial...
2017-01-11, 1914🔥, 0💬

What Are Stored Procedures in SQL Server
What Are Stored Procedures in SQL Server Transact-SQL? A stored procedure is a collection of Transact-SQL statements that stored in the SQL Server. A stored procedure can be executed later with an EXEC statement. SQL Server supports stored procedures with the following features: 1. Stored procedures...
2017-01-11, 1622🔥, 0💬

sys.procedures - Listing All Stored Procedures in SQL Server
How To List All Stored Procedures in the Current Database in SQL Server Transact-SQL? If you want to see a list of stored procedures in your current database, you can use the system view, sys.procedures as shown in this tutorial exercise: USE FyiCenterData; GO SELECT * FROM sys.procedures; GO Name o...
2017-01-05, 6305🔥, 0💬

"CREATE PROCEDURE" - Creating Simple Stored Procedures in SQL Server
How To Create a Simple Stored Procedure in SQL Server Transact-SQL? If you want to create a simple stored procedure with no input and output parameters, you can use the "CREATE PROCEDURE" command with a statement batch in a simple format as shown in below: CREATE PROCEDURE procedure_name AS statemen...
2017-01-05, 2803🔥, 0💬

EXECUTE - Executing Stored Procedures in SQL Server
How To Execute a Stored Procedure in SQL Server Transact-SQL? If you want execute a stored procedure created previously, you can use the EXECUTE statement in the following formats: EXEC procedure_name; EXECUTE procedure_name; The key word EXEC is actually optional. So you can execute a stored proced...
2017-01-05, 2288🔥, 0💬

Creating Stored Procedures with Statement Blocks in SQL Server
How To Create a Stored Procedure with a Statement Block in SQL Server Transact-SQL? If you are creating a stored procedure with multiple statements, it's better to use "BEGIN ... END" to group all statements into a single statement block. The tutorial exercise below shows you some good examples: USE...
2017-01-05, 1967🔥, 0💬

"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, 1617🔥, 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, 5898🔥, 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, 5369🔥, 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, 2275🔥, 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, 1862🔥, 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, 1533🔥, 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, 2587🔥, 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, 2088🔥, 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, 2035🔥, 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, 1822🔥, 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, 1769🔥, 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, 1624🔥, 0💬

<< < 6 7 8 9 10 11 12 13 14 15 16 > >>   ∑:509  Sort:Rank