Default or Optional Parameters are declared by assigning a default value to them. Then it is not necessary to pass any value to them while calling the SP, it will take the default value in case nothing is passed.
this is very useful,
create proc test
@studentid bigint = NULL
as
begin
if ( @studentid is not null )
select * from sec45.dbo.DailyAttendanceTable
where StudentId = @studentid
else
select * from sec45.dbo.DailyAttendanceTable
end
exec test --returns all rows
exec test 1285 -- returns only one row
Subscribe to:
Post Comments (Atom)
Comparing features of LangGraph vs CrewAI
LangGraph Orchestration vs CrewAI Orchestration The following table compares LangGraph and CrewAI orchestration across their menta...
-
http://www.sommarskog.se/share_data.html How to Share Data Between Stored Procedures An SQL text by Erland Sommarskog, SQL Server MVP. M...
-
CONCLUSION : 1. Normally, use following two when you do not want query compilation also to come into picture. CHECKPOINT DBCC DROPCLEA...
-
The evolution of LangChain has led to significant shifts in how agents are constructed, moving from the legacy AgentExecutor to the graph-b...
No comments:
Post a Comment