Mysql Oracle 备份表数据、批量删除表数据

一、Mysql

1、Mysql  批量删除表数据

SELECT CONCAT('delete  from  ',table_name,';') 
FROM information_schema.`TABLES`
WHERE table_schema='数据库名';

2、复制表结构及表数据

create table  dest_table as  select  *  from  src_table where  1=1;

3、复制表数据到另一张表

insert into dest_table select * from src_table 

二、Oracle

1、Oracle批量删除表数据

select ' delete from ' || table_name 
from user_tables where table_name like '%xxx%'

2、复制表结构及表数据

同mysql 一致  

原文地址:https://www.cnblogs.com/wongzzh/p/15093589.html