Home > database >  SQL statement has the same field calls two Max function will be different?
SQL statement has the same field calls two Max function will be different?

Time:05-20

For example: insert into test (id, name) select (select ifnull (Max (id), 0) + 1 from test), 'li Ming' where not the exists (select 1 from the test where id=(select ifnull (Max (id), 0) + 1 from test))
This statement has two local call Max function, in the case of high concurrency Max (id) inconsistent would happen?
  • Related