我有一個名爲的存儲過程Evaluate(something1,something2); 評估將採取一些參數,在數據庫中搜索它們並將結果插入結果表中。MySQL如何循環存儲過程?
現在我想創建一些類型的存儲過程,它將不斷調用Evaluate遍歷整個逗號分隔文件。這可能嗎?
僞代碼
assessEntireFile()
{
loop file
Evaluate(single line from file)
end loop
}
**The work flow of assessEntireFile() will be as followed:**
1. call assessEntireFile()
--assessEntireFile will load and iterate over an input file (line-by-line)
2. each iteration will call Evaluate() on that line
--evualte() will produce results in a table
3. complete
使用while循環遍歷表就夠了嗎?您可以在...之前將'LOAD DATA'文件... – 2012-02-24 17:47:32