As the title says, I'm getting the following error when I run this sql:
SELECT PASS FROM STAFF WHERE PASS COLLATE Latin1_General_CS_AS = 'lucasL90';
Error:
Static analysis:
4 errors were found during analysis.
Unrecognized keyword. (near "COLLATE" at position 34)
Unexpected token. (near "Latin1_General_CS_AS" at position 42)
Unexpected token. (near "=" at position 63)
Unexpected token. (near "'lucasL90'" at position 65)
SQL query: Documentation
SELECT PASS FROM STAFF WHERE PASS COLLATE Latin1_General_CS_AS = 'lucasL90'
MySQL said: Documentation
#1273 - Unknown collation: 'Latin1_General_CS_AS'
答案 0 :(得分:0)
使用
检查可用的排序规则SHOW CHARACTER SET;
然后更新你的陈述:
SELECT PASS FROM STAFF WHERE PASS COLLATE <one of the above collations here> = 'lucasL90';
答案 1 :(得分:0)
MySql的等效Sql Server Latin1_General_CS_AS
为latin1_general_cs
因此,您可以按照以下方式更改查询:
SELECT PASS
FROM STAFF WHERE PASS COLLATE latin1_general_cs = 'lucasL90'