Oracle 的 sp_generate_inserts
大多数 SQL 开发人员都知道并使用 Narayana Vyas Kondreddi 的 sp_generate_inserts
,来自 http://vyaskn .tripod.com/code/generate_inserts.txt
Oracle 有类似的东西吗?
Most SQL developers know and use Narayana Vyas Kondreddi's sp_generate_inserts
from http://vyaskn.tripod.com/code/generate_inserts.txt
Is there something similar for Oracle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想要一个包为您完成这一切(而 SQL Developer、TOAD 等都可以临时完成);但我见过的最接近 sp_generate_inserts 的是:
“PL/SQL Interface Generator”
http://sourceforge.net/projects/plsqlintgen/
运行下载中的两个脚本后必须这样做:
这将为输入表的 CRUD 发出 Create SPEC/BODY (这不会创建包,它只是将包脚本存储在 s 变量中:例如,
即使
这不完全适合您的需要,您应该能够按照自己的方式提取逻辑(只是注意,我根本不隶属于这个项目)。
if you wanted an package to do it all for you (while SQL Developer, TOAD, etc can all do it ad-hoc); but the closest thing to the sp_generate_inserts that I have seen is:
"PL/SQL Interface Generator"
http://sourceforge.net/projects/plsqlintgen/
after running the two scripts in the download all you have to do it:
and this will emit the Create SPEC/BODY for the CRUD for the inputted table (this does not create the package, it just stores the package script in the s variable as such:
e.g.
Even if this doesn't completely fit your need, you ought to be able to extract the logic to your own means. (just a note, I am not affiliated with this project at all)
Oracle 附带了一个名为 SQL Developer 的工具,这可以从表数据生成插入脚本。
With Oracle comes the tool called SQL Developer, and this has the facility to generate insert scripts from table data.