查看“︁MySQL/UPDATE”︁的源代码
来自康健生活
←
MySQL/UPDATE
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 引言 == 更新值。 <syntaxhighlight lang="mysql"> UPDATE `md_history` SET `message` = null;</syntaxhighlight> 将搜索结果作为更新值。 <syntaxhighlight lang="mysql"> update md_work w set folder_id = ( select tmp.folder_id from ( select team_id, id as folder_id from md_folder f ) tmp where w.team_id = tmp.team_id ); </syntaxhighlight> 复杂更新 <syntaxhighlight lang="mysql"> UPDATE md_team_user tu INNER JOIN ( SELECT MAX(tmp.create_at) AS create_at, tmp.team_id, tmp._user_id FROM ( SELECT thf.team_id AS team_id, thf.user_id AS user_id, thf.message -> '$.user' AS _user_id, thf.create_at AS create_at FROM md_team_history thf WHERE thf.message -> '$.user' IS NOT NULL ) AS tmp GROUP BY tmp.team_id, tmp._user_id ORDER BY tmp.team_id, tmp._user_id ) as cup ON tu.team_id = cup.team_id AND tu.user_id = cup._user_id SET tu.create_at = cup.create_at; COMMIT;</syntaxhighlight>
返回
MySQL/UPDATE
。
导航菜单
康健生活
搜索
user-page
通知
user-interface-preferences
个人工具
登录
五一
多读书,多运动,多到远处走走,再看看不一样的世界。