永发信息网

从sybase导出的SQL建表语句,请各位看下

答案:2  悬赏:60  手机版
解决时间 2021-03-15 06:19
create table ...(
..........

lock allpages
with dml_logging = full
on 'default'
请问其中的
with dml_logging = full和on 'default'是什么意思
最佳答案
dml_logging = full 表示使用完全DML日志模式,
on 'default'表示将表创建在默认数据段上面。
全部回答
在不同平台上导数据时,只能用bcp命令,但是bcp命令不能导出数据库表结构,所以需进行数据库表结构的导出。 在sybase12.5版本以上,可以用如下方式导出表结构: ddlgen –usa –pxxx –ddb_name –sxxx:port –ooutput_file 其中db_name指所要导出的数据库名。 ******************************************** 低于sybase12.5版本的,得进行执行脚本的方式导出表结构。脚本文件内容如下: use sybsystemprocs go if object_id('dbo.sp_ddl_create_table') is not null drop procedure sp_ddl_create_table print "dropping sp_ddl_create_table" go create proc sp_ddl_create_table as -- creates the ddl for all the user tables in the -- current database select right('create table ' + so1.name + '(' + ' ', 255 * ( abs( sign(sc1.colid - 1) - 1 ) ) )+ sc1.name + ' ' + st1.name + ' ' + substring( '(' + rtrim( convert( char, sc1.length ) ) + ') ', 1, patindex('%char', st1.name ) * 10 ) + substring( '(' + rtrim( convert( char, sc1.prec ) ) + ', ' + rtrim( convert( char, sc1.scale ) ) + ') ' , 1, patindex('numeric', st1.name ) * 10 ) + substring( 'not null', ( convert( int, convert( bit,( sc1.status & 8 ) ) ) * 4 ) + 1, 8 * abs(convert(bit, (sc1.status & 0x80)) - 1 ) ) + right('identity ', 9 * convert(bit, (sc1.status & 0x80)) ) + right(',', 5 * ( convert(int,sc2.colid) - convert(int,sc1.colid) ) ) + right(' ) ' + 'go' + ' ' + ' ', 255 * abs( sign( ( convert(int,sc2.colid) - convert(int,sc1.colid) ) ) - 1 ) ) from sysobjects so1, syscolumns sc1, syscolumns sc2, systypes st1 where so1.type = 'u' and sc1.id = so1.id and st1.usertype = sc1.usertype and sc2.id = sc1.id and sc2.colid = (select max(colid) from syscolumns where id = sc1.id) order by so1.name, sc1.colid go if object_id('dbo.sp_ddl_create_table') is not null begin grant execute on sp_ddl_create_table to public print "created sp_ddl_create_table" end else print "failed to create sp_ddl_create_table" go ************************************************************** 查看具体某数据库表结构方法如下,以查看nbcredit数据库表结构为例: 编辑脚本文件script.txt,保存在c:\,内容如下: use nbcredit go sp_ddl_create_table go 然后执行以下语名:isql –usa –pxxx –b –i script.txt –o scriptout.txt 其中scriptout.txt文件的内容即为整个数据库表结构。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
本人叫艺阳 起英文名 洋气 有国际范儿的 最好
世界最高峰位于图中哪个大洲?(  ) A.①
ipad上如何使用优酷 app
权健净旨茶怎么吃
手机上有没有办法把跟别人的聊天记录一次性全
御品国际地址在哪,我要去那里办事
兔子拉一点点的粘血,只是一点点,除了球虫病
常用蛋清敷脸好吗?
江西航务勘察设计院 待遇
奔驰r350全车电脑版控制模块字母代号
云陵镇地址在什么地方,想过去办事
斜顶客厅怎么装修
找本玄幻小说,大致情节是血脉被上天封印了,
股票中出现向下跳空缺口,然后三天后大阳线回
久居深海心已寒,求配对一个情侣名字。女生用
推荐资讯
求高人指教福鼎肉片里到底放了什么,味道变得
青岛市李沧区瑜鸿信复印社我想知道这个在什么
陕西延长石油矿业有限责任公司煤炭运销分公司
一汽丰田锐志前轮打死方向奔奔的响
小兔,小老虎,狮子的看图写话
单选题分子式为(C6H10O5)n和C3032H4816O872N7
右脸之前长痘痘,好不容易消了,但是却一片红
小猫拉肚子拉出血该怎么办
有什么综艺节目有宠物
深圳k486到重庆04车厢008号是不是靠窗户位置
21世纪人才报社·领上道招聘网我想知道这个在
我14了,学古典舞晚了吗?
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?