如何通过查询获取表ddl

编程入门 行业动态 更新时间:2024-10-28 03:19:48
本文介绍了如何通过查询获取表ddl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

可以帮助我获取sybase中现有表和索引的ddl。 我们可以使用

can any one help me to get the ddl of the already existing table and index in sybase. we can use

SELECT c.text From syscomments c, sysobjects o Where o.id=c.id and o.name=@procname Order By c.colid

获取触发器,程序和视图的脚本..但是对于表它不工作。是否有可用于表和索引的系统程序? 提前谢谢

to get the Scripts for triggers, procedures and view.. but for table it is not working. is there any system procedures available for table and index? Thank you in advance

推荐答案

试试这个: Try this: SELECT * FROM sys.sql_modules sm WHERE sm.definition LIKE '%ObjectName%'

更多推荐

如何通过查询获取表ddl

本文发布于:2023-10-28 23:56:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1538136.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ddl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!