CREATE TABLE IF NOT EXISTS table1(...)
CREATE TABLE IF NOT EXISTS
"Dynamic SQL Error - SQL error code = -104 - Token unknown - line 1, column 173 - ! Could not prepare statement"
QString query4; query4 = "EXECUTE BLOCK AS BEGIN "; query4+= "if (not exists(select 1 from rdb$relations where rdb$relation_name = 'EMPLOYEE')) then "; query4+= "execute statement 'create table employee ( id integer );'; "; query4+= "END!!"; statement.exec(query4); if (statement.lastError().isValid()){ QString text = statement.lastError().text(); QMessageBox::critical(this, tr("Error"), text);}