Phoenix Client Tutorial

Last updated: 2020-10-10 16:48:21

The Phoenix supports SQL queries. The following are some common operations:

  • Create a table
    0: jdbc:phoenix:> CREATE TABLE IF NOT EXISTS TEST (
      host char(50) not null,
      txn_count bigint
      CONSTRAINT pk PRIMARY KEY (host)
    );
  • Insert data
    0: jdbc:phoenix:>UPSERT INTO TEST(host,txn_count) VALUES('192.168.1.1',1);
    0: jdbc:phoenix:>UPSERT INTO TEST(host,txn_count) VALUES('192.168.1.2',2);
  • Query data
    0: jdbc:phoenix:>SELECT * FROM TEST;
  • Delete a data table
    0: jdbc:phoenix:>DROP TABLE IF EXISTS TEST;

For more operations and instructions, please see the community documentation.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help