MySQL随机选取资源随机选取一个资源 模拟表如下: setautocommit=false;updateroom_infosetstate=2whereRoomID=(select*from(selectRoomIDfromroom_infowherestate=1orderbyrand()limit1)a)an