继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

mysql常用连接查询join,left,right,cross

car
关注TA
已关注
手记 83
粉丝 56
获赞 363
select package_name_en  from tb_feature_package a cross join tb_package b on a.package_sid =b.sid where package_name_en is not null

select package_name_en  from tb_feature_package a left join tb_package b on a.package_sid =b.sid where package_name_en is not null
union
select package_name_en  from tb_feature_package a right join tb_package b on a.package_sid =b.sid where package_name_en is not null

update  tb_package b join(
select a.package_sid from tb_feature_package a join tb_package b on a.package_sid =b.sid
) a on a.package_sid =b.sid set b.package_name_en =b.package_name 
where b.package_name_en is  null

代码只做参考

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP