表的删除和复制

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 @   平凡的柳先生  阅读(41)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
点击右上角即可分享
微信分享提示