Comment puis-je compter le résultat d'une table et passer à une variable de procédure stockée?
DECLARE @totalrecs varchar select count(id) from table1
3 Réponses :
select @totalrecs= count(id) from table1
J'aime ce
DECLARE @totalCount Int Select @totalCount = count(*) From table1 Exec sp_DoSomething @Var = @totalCount