SQL DdL陈述式 [英] SQL DdL STATEMENTS
本文介绍了SQL DdL陈述式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何复制表的结构? ddl语句是做什么用的?请告诉我.
How to copy the structure of a table? What is the ddl statement for that? Please tell me.
推荐答案
我只是做-
I''d simply do -
select * into my_new_table from my_old_table where 1=2
另一种方式-
Another way -
create my_new_table as select * from my_old_table where 1 = 2
在Oracle中,使用正确的开关执行dbms_metadata.get_ddl.
对于SqlServer,请使用Management Studio.使用
有关数据库的节点的上下文菜单.
In Oracle you execute dbms_metadata.get_ddl with the right switches.
For SqlServer use the Management Studio. Use the
context menu for the node for the relevant database.
这篇关于SQL DdL陈述式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文