重命名表结构数据库

2022/6/16 2:21:21

本文主要是介绍重命名表结构数据库,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1、复制表结构
create table sms_send_record_bak_202220615 as select * from sms_send_record where 1=2;

2、插入短信数据
insert into sms_send_record_bak_202220615 select * from sms_send_record where send_date > to_date('2022-05-1 00:00:00','yyyy-mm-dd hh24:mi:ss')

3、查询数据短信
select * from sms_send_record_bak_202220615;

4、重命名
//RENAME sms_send_record TO sms_send_record_bak_202220614;
//RENAME sms_send_record_bak_202220615 TO sms_send_record;
//RENAME sms_send_record_bak_202220614 TO sms_send_record_bak_202220615;



这篇关于重命名表结构数据库的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程