任何人都可以帮助我将下面的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'
需要解决以下错误
[错误代码:1064 SQL状态:42000]您的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册以获取正确的语法,以在第1行的'COLLATE utf8_general_ci IN(N'Record')和TABLE_SCHEMA ='test'附近使用
答案 0 :(得分: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'。