检查SQLServer中是否存在表
IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME='mytablename') SELECT 1 AS res ELSE SELECT 0 AS res;
IF OBJECT_ID (N'mytablename', N'U') IS NOT NULL SELECT 1 AS res ELSE SELECT 0 AS res;
MySQL
SHOW TABLES LIKE '%tablename%';
PIPIONE
哈士奇WWW
ibeautiful
相关分类