我需要做類似的東西: select * from table1 where type case @param when 1 then EQUAL else NOT EQUAL end 3
選擇所有類型= 3或類型<> 3,取決於PARAM。 Considere大的選擇涉及到很多的表.... 的想法是不一樣複製上選擇「聯盟」 select * from table1 where type = 3
沒有發生 計劃: def inc(n)
n + 1
end
sum = 0
threads = (1..10).map do
Thread.new do
10_000.times do
sum = inc(sum)
end
end
end
threads.each(&:join)
p sum
輸出: $ ruby