This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11513|Reply: 0

[Source] The number of tables and the table names in the statistical database in Mssql and Oracle

[Copy link]
Posted on 10/20/2016 1:07:01 PM | | |

Number of statistical tables in MSSQL:
SELECT count(*) FROM sys.objects WHERE XType='U' //Number of tables
SELECT count(*) FROM sys.objects WHERE XType= 'V' //Number of views
SELECT count(*) FROM sys.objects WHERE XType= 'P' //Number of stored procedures
Mssql gets the table name:
SELECT name  FROM sys.objects WHERE XTYPE='U'

Total number of statistical tables in ORCALE:
SELECT count(*) FROM dba_tables WHERE owner='username' ———— has DBA privileges
SELECT count(*) FROM all_tables WHERE owner='Username' ———— normal user permissions
ORCALE gets the name of the table:
SELECT name FROM dba_tables WHERE owner='username'
SELECT name FROM all_tables WHERE owner='username'




Previous:Allow Entity Framework to start no longer valid __MigrationHistory table
Next:Discuz forum with verification code post login source code
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com