查詢數(shù)據(jù)庫中所有用戶表或表的個數(shù)

字號:

查詢數(shù)據(jù)庫db1中所有的用戶表
    use db1
    go
    select * from sysobjects where type = ’U’
    系統(tǒng)表的個數(shù)
    select count(*) from sysobjects where type = ’S’
    存儲過程:type = ’P’
    視圖: type = ’V’