表的删除和复制

1.表的删除

drop table 表名

drop table if exist author ;

2.表的复制

#1.复制表的结构

creat table 新表 like 要复制的表

creat table copy like author;

#2.复制表的结构和数据

creat table 新表

select * from 旧表;

create table copy2

select * from author ;

#只复制部分

create table copy3

select id,name

from author

where name = '中国' ;

posted @ 2022-12-16 14:33  平凡的柳先生  阅读(48)  评论(0)    收藏  举报