如何从数据库中获取表脚本
问题描述:
Hii,
我们如何在Sybase中从数据库中获取表脚本。
谢谢提前。
Hii,
How can we Take Table Scripts from database in Sybase.
thank you in advance.
答
好问题,
这里是部分解决方案...
Good question,
And here''s a partial solution ...
SELECT [object_id], [name], [column_id] FROM sys.columns WHERE [object_id] > 99 ORDER BY [name]
字段类别中的其他候选项,用于表重构,不太可能被scriptor所知(你,数据库复印机):
Other candidates in the field category, to be used for table reconstruction, less likely to be known by the "scriptor" (you, the database copier):
[system_type_id]
[user_type_id]
[max_length]
[precision]
[scale]
[collation_name]
[is ................ (etc)]
[xml_collection_id]
[default_object_id]
[rule_object_id]
重点是程序员必须使用一些TSQL重建表格:
The point being that the programmer will have to reconstruct the tables using some TSQL:
CREATE TABLE ....
基于他对Sybase实例的了解。
Based upon his knowledge of the Sybase instance.