若该文为原创文章,转载请注明原文出处
本文章博客地址:https://hpzwl.blog.csdn.net/article/details/131077228
红胖子网络科技的博文大全:开发技术集合(包含Qt实用技术、树莓派、三维、OpenCV、OpenGL、ffmpeg、OSG、单片机、软硬结合等等)持续更新中…
数据库相关开发
需求
数据库字段达到四五百个,在分表中,只有一个表存储了用户名字段,需要删除该用户名,于是需要在其他分表中删除该用户名的所有记录。
实现方式
select * from student_info;
select * from student_info2;
delete from student_info2
where no in (select no from student_info where sex = "1");
delete from student_info
where sex = "1";
select * from student_info;
select * from student_info2;
若该文为原创文章,转载请注明原文出处
本文章博客地址:https://hpzwl.blog.csdn.net/article/details/131077228