Cool eye

BlogJava 首页 新随笔 联系 聚合 管理
  63 Posts :: 4 Stories :: 3 Comments :: 0 Trackbacks
  • select table_name from INFORMATION_SCHEMA.TABLES

  • SELECT dbo.syscolumns.name, dbo.syscolumns.colid AS columnID,dbo.sysobjects.ID AS TableID, dbo.systypes.name as DataType,case when dbo.syscolumns.autoval is not null then 1 else 0 end isautoval,  dbo.syscolumns.prec ,dbo.syscolumns.isnullable ,dbo.syscolumns.scale,dbo.sysproperties.[value] AS Description FROM   dbo.systypes RIGHT OUTER JOIN dbo.syscolumns ON dbo.systypes.xtype = dbo.syscolumns.xtype LEFT OUTER JOIN dbo.sysproperties ON dbo.syscolumns.id = dbo.sysproperties.id AND dbo.syscolumns.colid = dbo.sysproperties.smallid RIGHT OUTER JOIN  dbo.sysobjects ON dbo.syscolumns.id = dbo.sysobjects.id WHERE systypes.xtype = systypes.xusertype and (dbo.sysobjects.xtype = 'u') AND (dbo.systypes.status <> 1) AND (dbo.sysobjects.id <> 1977058079) and dbo.sysobjects.name='hr_users' order by dbo.syscolumns.colid

  • SELECT  dbo.syscolumns.name as name, dbo.sysproperties.[value] AS Description FROM   dbo.syscolumns LEFT OUTER JOIN dbo.sysproperties ON dbo.syscolumns.id = dbo.sysproperties.id AND dbo.syscolumns.colid = bo.sysproperties.smallid RIGHT OUTER JOIN dbo.sysobjects ON dbo.syscolumns.id = dbo.sysobjects.id WHERE (dbo.sysobjects.xtype = 'u') AND (dbo.sysobjects.id <> 1977058079) and dbo.sysobjects.name='hr_users'

     

     

posted on 2006-01-06 14:46 joeyeezhang 阅读(290) 评论(0)  编辑  收藏 所属分类: Database

只有注册用户登录后才能发表评论。


网站导航: