mysql oracle表存在

oracle :

SELECT * FROM TAB WHERE TNAME='"+tableName+"'
查询一个表名是否存在
mysql
SELECT *
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
AND table_name = 'your_table_name';

请将 your_database_name 替换为你要查询的数据库名,将 your_table_name 替换为你要检查的表名。

如果查询的结果集中存在记录,则表示表存在,否则表示表不存在。

已唠叨完了 2024-03-06 04:42:15

posted on 2024-03-06 05:51  lydstory  阅读(4)  评论(0编辑  收藏  举报

导航