Answer: By using INSERT...EXEC statement we can insert result set of stored procedure into a table
For example, If TableName: EMP which has columns id, anme, salary (nullable), departmentID (nullable) and procedure returns only id and name as output then
INSERT INTO TableName( id, name)
EXEC ProcedureName
Asked In: Many Interviews |
Alert Moderator