MySQL How to INSERT INTO [temp table] FROM [Stored Procedure]

前端 未结 5 1131
心在旅途
心在旅途 2020-12-03 13:32

This is very similar to question 653714, but for MySQL instead of SQL Server.

Basically, I have a complicated select that is the basis for several stored procedures.

5条回答
  •  生来不讨喜
    2020-12-03 14:23

    My first reaction was "That sounds like a view to me". Doesn't that abstract it enough so you can just add the variability into an SP per case?

    Anything that adds a temp table that wouldn't otherwise be there is a very likely antipattern.

提交回复
热议问题