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
Consecutive publisher publish more than 2 books for 3 days
months
EXP 8
sum vs count with multiple options in group by clause
Unpivot Example
Delete double entries from a table without primary key
Allocations Check
My data
QUAN LY CHUYEN BAY
database size