select * from sysobjects where type ='U' and uid = user_id('dbo')

解决方案 »

  1.   

    select * from sysobjects where type ='U' and uid = user_id('user') 
      

  2.   

    use pubs
    select name from sysobjects where type ='U' and uid = user_id('dbo') 
    name                                                                                                                             
    -------------------------------------------------------------------------------------------------------------------------------- 
    authors
    publishers
    titles
    titleauthor
    stores
    sales
    roysched
    discounts
    jobs
    pub_info
    employee(11 row(s) affected)
      

  3.   

    那是因为这个系统表也是dbo建立的
    查询的时候先选择数据库,因为sysobjects是当前数据库的对象
      

  4.   

    select * from sysobjects 
      where  OBJECTPROPERTY(id, N'Istable') = 1 and
              OBJECTPROPERTY(id, 'Issystemtable') <> 1
      order by name
    仅用type='U'会把视图和存储过程也显示出来的
    给分吧,hehe
      

  5.   

    楼上有误,两个结果是一样的。视图type='V',存储过程type='P',我有试过。