Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果查询运行正确,则SQL 查询CREATE TABLE mytable IF NOT EXISTS返回 true(在我的 PHP 应用程序中),但如果实际创建了表则不会。
CREATE TABLE mytable IF NOT EXISTS
如何在不运行另一个查询的情况下判断表是否已创建?我不想每次运行我的应用程序时都运行双倍的查询量。
尝试这个
CREATE TABLE IF NOT EXISTS `table_name` ( `table field defination` ) ENGINE = `engine_name`