select .... while condition 無結果的 的話執行insert