一、使用select语句创建现有表的结构
create table tab_user as select * from tab_admin where 1=2 永假式,只创建表的结构,没有记录
二、使用select语句将一个表中的记录插入到另一个表中
insert into tab_user(select * from tab_admin)
本文介绍了如何使用SQL语句创建表结构而不插入数据的方法,同时演示了如何通过SELECT语句将一个表的数据迁移到另一个表的过程。
一、使用select语句创建现有表的结构
create table tab_user as select * from tab_admin where 1=2 永假式,只创建表的结构,没有记录
二、使用select语句将一个表中的记录插入到另一个表中
insert into tab_user(select * from tab_admin)

被折叠的 条评论
为什么被折叠?