diff --git a/packages/nocodb/src/db/sql-client/lib/mysql/VitessClient.ts b/packages/nocodb/src/db/sql-client/lib/mysql/VitessClient.ts index 2b3836e7fe..df37c2f13b 100644 --- a/packages/nocodb/src/db/sql-client/lib/mysql/VitessClient.ts +++ b/packages/nocodb/src/db/sql-client/lib/mysql/VitessClient.ts @@ -131,7 +131,8 @@ class Vitess extends MysqlClient { args.databaseName = this.connectionConfig.connection.database; const response = await this.sqlClient.raw( - `select *, table_name as tn from information_schema.columns where table_name = '${args.tn}' ORDER by ordinal_position`, + `select *, table_name as tn from information_schema.columns where table_name = ?? ORDER by ordinal_position`, + [args.tn], ); if (response.length === 2) { @@ -209,7 +210,8 @@ class Vitess extends MysqlClient { try { const response = await this.sqlClient.raw( - `select *, TABLE_NAME as tn from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = '${args.tn}' ORDER by ordinal_position;`, + `select *, TABLE_NAME as tn from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = ? ORDER by ordinal_position;`, + [args.tn], ); if (response.length === 2) {