代码如下:
create table_new as select * from table_old where 1=0
本文介绍了一种使用 SQL 语句创建一个不包含任何数据的新表的方法。通过一个示例展示了如何基于现有表的结构来创建一个空表,该方法特别适用于需要保留原有表结构但又不想复制数据的情况。
代码如下:
create table_new as select * from table_old where 1=0

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