mysql 和 mssql联合更新的差异

来源:互联网 发布:java框架设计 编辑:程序博客网 时间:2024/06/05 03:44

mysql写法(update后面居然可以跟两个联合表的表名,我又长见识了)

UPDATE pre_common_member_profile,

pre_common_member SET pre_common_member_profile.realname = 'hong' WHERE pre_common_member_profile.uid = pre_common_member.uidAND pre_common_member.username = 'testone'


mssql写法

PDATE pre_common_member_profile

SET pre_common_member_profile.realname = 'hong' 

frompre_common_member_profile    inner join pre_common_member 

on pre_common_member_profile.uid = pre_common_member.uid

where pre_common_member.username = 'testone'


原创粉丝点击