Declare @T Table ([column definitions here]) Insert @T Exec storedProcname params Select * from @T Where ...