Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
new problem SQL
a
Tablestudent
MS SQL Joins
2021.02.25 Lab 4
identity
Create and Insert Command Example
Miglior film animato
Record rows
Assignment 1
Please log in to post a comment.