1、Mysql

SELECT COUNT(*) FROM information_schema.TABLES WHERE table_name ='表名' AND TABLE_SCHEMA = (select DATABASE()) AND TABLE_TYPE = 'BASE TABLE';

2、Oracle

select count(*) from user_tables where table_name =upper('表名')

3、Sqlserver

select count(*) from sysobjects where id = object_id('表名') and OBJECTPROPERTY(id, N'IsUserTable') = 1

By xbingo

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注