MySQL 查询的等效 MemSQL 查询
Equivalent MemSQL query for MySQL query
任何人都可以帮助我将下面的 MySQL 查询转换为 MemSQL 查询。
SELECT TABLE_SCHEMA AS `schema`, TABLE_NAME AS `name`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME COLLATE utf8_general_ci IN (N'Record')
AND TABLE_SCHEMA = 'test'
需要解决以下错误
[Error code:1064 SQL state:42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLLATE utf8_general_ci IN (N'Record')AND TABLE_SCHEMA = 'test'' at line 1
您可以使用
SELECT TABLE_SCHEMA AS `schema`, TABLE_NAME AS `name`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME IN ('Record')
AND TABLE_SCHEMA = 'test';
区分大小写,或者
SELECT TABLE_SCHEMA AS `schema`, TABLE_NAME AS `name`
FROM INFORMATION_SCHEMA.TABLES
WHERE lower(TABLE_NAME) IN ('record')
AND TABLE_SCHEMA = 'test';
不区分大小写。
那里不支持 COLLATE 子句,也不支持 N'string'。
任何人都可以帮助我将下面的 MySQL 查询转换为 MemSQL 查询。
SELECT TABLE_SCHEMA AS `schema`, TABLE_NAME AS `name`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME COLLATE utf8_general_ci IN (N'Record')
AND TABLE_SCHEMA = 'test'
需要解决以下错误
[Error code:1064 SQL state:42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLLATE utf8_general_ci IN (N'Record')AND TABLE_SCHEMA = 'test'' at line 1
您可以使用
SELECT TABLE_SCHEMA AS `schema`, TABLE_NAME AS `name`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME IN ('Record')
AND TABLE_SCHEMA = 'test';
区分大小写,或者
SELECT TABLE_SCHEMA AS `schema`, TABLE_NAME AS `name`
FROM INFORMATION_SCHEMA.TABLES
WHERE lower(TABLE_NAME) IN ('record')
AND TABLE_SCHEMA = 'test';
不区分大小写。
那里不支持 COLLATE 子句,也不支持 N'string'。