mysql查询复制一个表的结构以创建另一个表 [英] Mysql query to copy the structure of a table to create another table

查看:570
本文介绍了mysql查询复制一个表的结构以创建另一个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建Mysql查询以复制现有表的结构以创建另一个表时寻求帮助.

Looking for help in creating a Mysql query to copy the structure of an existing table to create another table.

推荐答案

要像在另一个表的精确副本中那样创建表,请执行以下操作:

To create a table as in an exact replica of another table:

CREATE TABLE `new_table_name` LIKE `old_table_name`;

这篇关于mysql查询复制一个表的结构以创建另一个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆