设为首页 加入收藏

TOP

Sybase查询表结构的方法(类似于Oracle的Desc)(四)
2015-07-24 11:22:52 来源: 作者: 【 】 浏览:22
Tags:Sybase 查询表 结构 方法 类似 Oracle Desc
page' will be displayed. ** ** Table level setting for option dealloc_first_txtpg (sysstat2 in sysobjects) ** 0x2000000 ---- 536870912, deallocate first text page after NULL update ** 0x8000000 ---- -2147483648, keep first text page after NULL update ** ** DB level setting for option 'deallocate first text page' (status4 in sysdatabases) ** 0x8000000 ---- -2147483648, deallocate first text page after NULL update */ select @db_dealloc_ftp = hextoint('0x80000000') select @tab_dealloc_ftp = hextoint('0x20000000') select @tab_keep_ftp = hextoint('0x80000000') select @sysstat2 = sysstat2, @objtype = type from sysobjects where id = object_id(@objname) /* ** Only check user tables */ if (@objtype = 'U') begin select @db_stat4 = status4 from master.dbo.sysdatabases where dbid = db_id() if ((@sysstat2 & @tab_dealloc_ftp != 0) or ((@sysstat2 & @tab_keep_ftp = 0) and (@db_stat4 & @db_dealloc_ftp != 0))) begin select @valstat2 = @tab_dealloc_ftp end else begin select @valstat2 = @tab_keep_ftp end select @msgnum = msgnum, @sysopt_name = name, @sep = '' from master.dbo.spt_values where type = 'O2' and number = @valstat2 if (@msgnum != 17119) begin select @sysopt_name = isnull(description, @sysopt_name) from master.dbo.sysmessages where error = @msgnum and isnull(langid, 0) = @sptlang update #sphelp5rs set Object_status = ltrim(Object_status + @sep + @sysopt_name) from #sphelp5rs a, sysobjects o where a.Name = o.name and o.sysstat & 15 = 3 and o.id = object_id(@objname) end end -- } /* Set Object_status based on sysstat3 to show any special status the object may have */ select @sysstat3 = sysstat3, @objtype = type from sysobjects where id = object_id(@objname) select @valstat3 = min(number), @sep = '' from master.dbo.spt_values where type = 'O3' and number > 0 and number & @sysstat3 = number while (@valstat3 is not null) begin -- { select @msgnum = msgnum, @sysopt_name = name from master.dbo.spt_values where type = 'O3' and number = @valstat3 /* We do not allow PRS objects to be defined on other PRS ** objects. Even if we plan to support this in future, this ** will be a major design change and sp_help will have to be ** updated accordingly to allow that. The bit 0x40 in sysstat3 ** is currently overridden to check if PRS objects are defined ** on any object. */ if not (@objtype = 'RS' and @msgnum = 17119) begin select @sysopt_name = isnull(description, @sysopt_name) from master.dbo.sysmessages where error = @msgnum and isnull(langid, 0) = @sptlang update #sphelp5rs set Object_status = ltrim(Object_status + @sep + @sysopt_name) from #sphelp5rs a, sysobjects o where a.Name = o.name and o.sysstat & 15 in (3, 4) and o.sysstat3 & @valstat3 = @valstat3 end select @valstat3 = min(number), @sep = ', ' from master.dbo.spt_values where type = 'O3' and number > @valstat3 and number & @sysstat3 = number end -- } /* ** If the object type is precomputed result set then set Object_status ** information with the following properties: ** a. Refresh Policy: immediate/manual ** b. State: enabled/disabled ** c. QRW State: enabled/disabled for QRW */ if @objtype = 'RS' begin -- { /* #sphelp5rs will only have 1 row corresponding to a PRS */ update #sphelp5rs set Object_status = /*
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 4/9/9
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇先打11.2.0.3.8这个PSU,后建库 下一篇oracle巡检脚本-部分

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·你必须要弄懂的多线 (2025-12-25 04:22:35)
·如何在 Java 中实现 (2025-12-25 04:22:32)
·Java【多线程】单例 (2025-12-25 04:22:29)
·C++中智能指针的性能 (2025-12-25 03:49:29)
·如何用智能指针实现c (2025-12-25 03:49:27)