Search code examples
cassandracqlcassandra-3.0

SELECT clause in Cassandra CQL


I need to run the following query (SQL syntax)

select AGGREGATE_NAME AS NAME, KEYSPACE_NAME from SYSTEM_SCHEMA.AGGREGATES
UNION ALL
select TRIGGER_NAME AS NAME, KEYSPACE_NAME from SYSTEM_SCHEMA.TRIGGERS

But, of course, Cassandra does not support UNION ALL. How to write this in one query like this in Cassandra CQL?


Solution

  • As you're doing a UNION ALL (all rows), simply write it as two separate queries and concatenate your results. Easiest answer I can think of.

    -Jim