
sql - What is a stored procedure? - Stack Overflow
A stored procedure is a named collection of SQL statements and procedural logic i.e, compiled, verified and stored in the server database. A stored procedure is typically treated like other database objects …
sql server - Execute stored procedure with an Output parameter?
Oct 19, 2009 · The easy way is to right-click on the procedure in Sql Server Management Studio (SSMS), select 'Execute stored procedure..." and add values for the input parameters as prompted.
Search text in stored procedure in SQL Server - Stack Overflow
Feb 5, 2013 · 5 I created a procedure to search text in procedures/functions, tables, views, or jobs. The first parameter @search is the search criterion, @target the search target, i.e., procedures, tables, …
Optional parameters in SQL Server stored procedure
Jan 8, 2023 · I'm writing some stored procedures in SQL Server 2008. Is the concept of optional input parameters possible here? I suppose I could always pass in NULL for parameters I don't want to use, …
How to return the output of stored procedure into a variable in sql ...
Aug 15, 2012 · I want to execute a stored procedure in SQL Server and assign the output to a variable (it returns a single value) ?
Get the text of a stored procedure in SQL Server
I am trying to save an old stored procedure into a string. When I use the following I do not get any line breaks. SELECT @OldProcedure = Object_definition(object_id) FROM sys.procedures WHERE n...
t sql - How to view the stored procedure code in SQL Server …
I am new to SQL Server. I am logged into my database through SQL Server Management Studio. I have a list of stored procedures. How do I view the stored procedure code? Right clicking on the sto...
Function vs. Stored Procedure in SQL Server - Stack Overflow
In SQL Server, functions and stored procedure are two different types of entities. Function: In SQL Server database, the functions are used to perform some actions and the action returns a result …
sql server - Select columns from result set of stored procedure - Stack ...
Oct 16, 2008 · I have a stored procedure that returns 80 columns, and 300 rows. I want to write a select that gets 2 of those columns. Something like SELECT col1, col2 FROM EXEC MyStoredProc …
sql - How to SELECT FROM stored procedure - Stack Overflow
May 4, 2017 · CREATE PROCEDURE MyProc AS BEGIN SELECT * FROM MyTable END My actual procedure is a little more complicated, which is why a stored procedure is necessary. Is it possible to …