Làm sao insert kết quả của một stored procedure vào một temporary table trong SQL Server?
Làm sao insert kết quả của một stored procedure vào một temporary table trong SQL Server?
Chèn kết quả stored procedure vào bảng tạm:
CREATE TABLE #Result (Id INT, Name NVARCHAR(100));
INSERT INTO #Result (Id, Name)
EXEC dbo.usp_GetCustomers @Region = 'VN';
SELECT * FROM #Result;
INSERT ... EXEC (SP bên trong không được dùng nó nữa).Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.