例如:insert into test(id,name) select (select ifnull(max(id),0)+1 from test),'李明' where not exists(select 1 from test where id=(select ifnull(max(id),0)+1 from test))
這個陳述句有兩個地方呼叫了max函式,在高并發的情況下會出現max(id)不一致的情況嗎?
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/284445.html
標籤:MySQL
上一篇:ACCESS 不重復計數
