Fix bad SQL grammar (#3445)

This commit is contained in:
ljhrot 2020-07-25 23:07:13 +08:00 committed by GitHub
parent 479ef3ff65
commit c3818ff064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2194,7 +2194,7 @@ public class EmbeddedStoragePersistServiceImpl implements PersistService {
@Override @Override
public boolean isExistTable(String tableName) { public boolean isExistTable(String tableName) {
String sql = String.format("select 1 from %s limit 1", tableName); String sql = String.format("SELECT 1 FROM %s FETCH FIRST ROW ONLY", tableName);
try { try {
databaseOperate.queryOne(sql, Integer.class); databaseOperate.queryOne(sql, Integer.class);
return true; return true;