Apache Phoenix SQL command reference
You can use these data definition language (DDL) and data manipulation language (DML) commands to perform database operations on Apache Phoenix tables.
Command | Description | Simple example |
---|---|---|
CREATE TABLE | Creates a new table |
|
DROP TABLE | Drops an existing table |
|
CREATE VIEW | Creates a new view over an existing Apache HBase or Phoenix table |
|
DROP VIEW | Drops an exisiting view. When you drop a view, the underlying table data is not affected; the index data for the view is deleted |
|
SELECT | Selects data from one or more tables |
|
UPSERT VALUES | Inserts value if the value is not present in the table and updates the value in the table if the value is already present. The list of columns is optional and if not present, the data is mapped to the column in the order they are declared in the schema |
|
UPSERT SELECT | Inserts value if the value is not already present and updates the rows in the table based on the results of running the next query |
|