Apache Cassandra / DataStax Enterprise中的表别名

3

在Cassandra中是否可以为表设置别名?我们使用的DataStax Enterprise版本是3.2.1。

非常感谢您的帮助。

例如:

 select s from example s where s.id='1234';
2个回答

4

很遗憾,在Apache Cassandra中没有办法给表起别名。但是你可以使用as参考链接)来给返回的列名起别名,例如:

SELECT event_id, dateOf(created_at) as creation_date, blobAsText(content) as content FROM timeline;

然而,您不能为表设置别名。


0

在Cassandra中,您不能为表设置别名。重要的是要理解,在Cassandra中没有必要为表设置别名。在RDBMS查询中,如果查询涉及多个表,例如连接查询,则表别名很有帮助。但是在Cassandra中,这种情况根本不会发生。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接