Home >Database >Mysql Tutorial >select-在两个应用,两条连接的情况下mysql存储过程是否是同步的执行的?

select-在两个应用,两条连接的情况下mysql存储过程是否是同步的执行的?

WBOY
WBOYOriginal
2016-06-06 09:41:161121browse

selectmysqljava数据存储过程

<code> CREATE DEFINER = `root`@`%` PROCEDURE `NewProc`()begindrop table if exists tem_request;create temporary table tem_request select RequestID,SaleCycleID,StationID from s_betrequest where requestStatus = 0 limit 0, 10;update s_betrequest set RequestStatus = 1 where RequestID in (select RequestID from tem_request);end;</code>

我想启动两个应用,同时对数据库操作,调用此存储过程,要求两边取到的数据必须不一致,就是各自取到不同的结果集。

上面存储过程是 将数据查询出来 存放到临时表 tem_request 里 ,将每一条数据的状态修改为1(查询时为0)

请问mysql 的存储过程是否是同步的,或者可不可以做到同步

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn