在cassandra中选择查询

时间:2016-02-09 04:43:42

标签: sql select cassandra cassandra-2.0 cql

我得到错误"第2:28行在输入时没有可行的替代方案api_version作为ApiVersion"在cassandra。我是cassandra的新手。 我的查询是。

    "SELECT 'api_version As ApiVersion',
            'sid As CarrierSid',
            'phone_number As PhoneNumber',
            'network As Network',
            'wireless As Wireless',
            'zipCode As ZipCode',
            'city As City',
            'price As Price',
            'date_time As CreatedDate', 
            FROM carrier";

1 个答案:

答案 0 :(得分:1)

 "SELECT api_version As ApiVersion,
            sid As CarrierSid,
            phone_number As PhoneNumber,
            network As Network,
            wireless As Wireless,
            zipCode As ZipCode,
            city As City,
            price As Price,
            date_time As CreatedDate, 
            FROM carrier";

你有单引号(')使查询失败。试试没有它。