复合查询

MySQL复合语句用法

update和select联用, 将advid=2记录的数据同步更新到advid=14 update advertisement A inner join advertisement B set A.title = B.title, A.targets = B.targets, A.parameters= B.parameters, A.code = B.code where A.advid=14 and B.advid=2 insert和select联用, 将advid=4记录的数据拷贝出来,定义type字段为xxx,作为新纪录插入 INSERT INTO advertisement (available, type,displayorder, title, targets,parameters, code,starttime,endtime) SELECT available, "xxxx" as "type",displayorder, title, targets,parameters, code,starttime,endtime FROM advertisement WHERE advid = 4 mysql拷贝root用户,改名,并修改允许登录为% INSERT INTO user ( Host, User, Select_priv...
执行时间: 1714138555995.4 毫秒