如果表中某字段不存在 或者某字段不存在数据则删除该表。
SET @tables = NULL;
SELECT count(p0) INTO @tables from cooling_pipe;
SET @tables = IF(@tables,'SELECT NULL;','DROP TABLE cooling_pipe;');
PREPARE stmt1 FROM @tables;
EXECUTE stmt1;
DEALLOCATE PREPARE stmt1;
如果表中某字段不存在 或者某字段不存在数据则删除该表。
SET @tables = NULL;
SELECT count(p0) INTO @tables from cooling_pipe;
SET @tables = IF(@tables,'SELECT NULL;','DROP TABLE cooling_pipe;');
PREPARE stmt1 FROM @tables;
EXECUTE stmt1;
DEALLOCATE PREPARE stmt1;