Cassandra查询获取错误

时间:2016-02-15 10:35:51

标签: cassandra cassandra-2.0

朋友我在执行以下查询时遇到此错误:意外令牌附近的语法错误`(' 帮帮我...

 INSERT INTO table_name(account_sid, transcription_id, audio_url, call_sid, callback_method, callback_url, cost, duration, recording_sid, status, transcription_change_date, transcription_date, transcription_sid, transcription_text, type) VALUES ('534534534534535', now(), '', '', '', '','', '', '', '', '', '', '', '', '');

1 个答案:

答案 0 :(得分:1)

Type是CQL中的关键字,因此失败。 你可以使用双引号来逃避。

 INSERT INTO table_name(account_sid, transcription_id, audio_url, call_sid, callback_method, callback_url, cost, duration, recording_sid, status, transcription_change_date, transcription_date, transcription_sid, transcription_text, "type") VALUES ('534534534534535', now(), '', '', '', '','', '', '', '', '', '', '', '', '');

List of keywords in CQL