How can I loop through all rows of a table? (MySQL)

后端 未结 5 1081
情深已故
情深已故 2020-11-27 10:56

I have a table A and there is one primary key ID.

Now I want to go through all rows in A.

I found something like \'for each record in A\', but this seems to

5条回答
  •  误落风尘
    2020-11-27 11:37

    CURSORS are an option here, but generally frowned upon as they often do not make best use of the query engine. Consider investigating 'SET Based Queries' to see if you can achieve what it is you want to do without using a CURSOR.

提交回复
热议问题