Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Dynamic Sql command with output variable
select * FROM pilots ----- DECLARE @sqlCommand nvarchar(1000) DECLARE @id int declare @counts int SET @id = '2' SET @sqlCommand = 'SELECT @cnt=COUNT(*) FROM pilots WHERE id = @id' EXECUTE sp_executesql @sqlCommand, N'@id int,@cnt int OUTPUT', @id = @id, @cnt=@counts OUTPUT select @counts as Counts
run
|
edit
|
history
|
help
0
SQL_leetcode
SQL_Joins_Intersect_Except_Union
BRYAN_BD1
Finding gaps, NOT EXISTS clause analysis_1_put on a wall
Stored procedure ex1
STACK
Demo
Print 10 records
tt
2021-03-06_LeetCodeSQL