1.采用打开企业管理器---数据库----表
  看到的表分:系统表和用户表,这里显示的表才是真正的用户表和系统表!!!但这可能与sysobjects中的系统表与用户表存在差异. 因为sysobjects 表本身可能被修改,比如将dtproperties表类型由S改成U,这样使用:
Select Name from sysobjects where xtype='u'
得到的用户表就不准确了
大家有何好方法如何才能真正得到用户表呢?

解决方案 »

  1.   

    Select Name from sysobjects where xtype='u' and id>100看可以不?
      

  2.   

    select * from sysobjects where objectproperty(id,'ismsshipped')<>1 and objectproperty(id,'istable')=1
    order by 1
      

  3.   

    Select Name from sysobjects where (name<>'DataDict'and xtype='u' and id>100) order by name
    表dtproperties,它的值也是大于100的
      

  4.   

    andy1995(发现一个不错的SQLServer网站:www.windbi.com) (
    你的方法可行,能解释一下吗?select * from sysobjects where objectproperty(id,'ismsshipped')<>1 and objectproperty(id,'istable')=1
    order by 1
      

  5.   

    OBJECTPROPERTY是一个系统函数,返回当前数据库中对象的有关信息。参数IsMSShipped表示在安装 Microsoft&reg; SQL Server&#8482; 2000 的过程中创建的对象。 
    1 = True
    0 = False参数IsTable判断对象是不是表。 
    1 = True
    0 = False
      

  6.   

    要学习,上www.windbi.com,哈哈哈