How to make a count from a stored procedure and insert them into a table?

0

Good day I am looking for how to make a count from a stored procedure and that the result is inserted in a table, how to do the count but I do not know how to do it from a stored.

SELECT COUNT (User) AS Count from tbl_Ansignations

    
asked by Gdm96 23.05.2018 в 15:12
source

1 answer

0

Just like that

USE [TuBaseDeDatos];  
GO  
CREATE PROCEDURE [nombreStore]   
--Parametros si los necesitas
--@LastName nvarchar(50),     
AS   

-- tus transacciones
insert into [tuTabla] (columna) values (SELECT COUNT(Usuario) AS Conteo FROM tbl_Asignaciones)

If you have more information about stored procedures, give a revised page to Microsoft link

    
answered by 23.05.2018 в 15:21