select name, phone, 'users' as table_name from usersunionselect name, phone, 'vendors' as table_name from vendors;
更好的解决方案是使用
union all,因此服务器将不会检查不同的值
select name, phone, 'users' as table_name from usersunion allselect name, phone, 'vendors' as table_name from vendors;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)