tencent cloud

Tencent Cloud TCHouse-P

Release Notes
Product Introduction
Overview
Use Cases
Node Specification
Cluster Architecture
Purchase Guide
Billing Overview
Purchase Methods
Payment Overdue
Getting Started
Operation Guide
Managing Cluster
Accessing Data Warehouse
Monitoring and Alarming
Access Management
Performance Metrics
TPC-B
Tools and Downloads
Data Ingestion
Importing TencentDB Data Offline with DataX
Syncing Incremental Data from MySQL with DataX
Importing and Exporting COS Data at High Speed with External Table
Syncing EMR Data with External Table
Implementing CDWPG UPSERT with Rule
Data Warehouse Development
Creating Airflow in Cloud
API Documentation
History
Introduction
API Category
Making API Requests
Information Query APIs
Instance APIs
Query APIs
Cluster Management APIs
Cluster Operation APIs
Data Types
Error Codes
Practical Tutorial
Data Warehouse Table Development
Table Distribution Key Selection
Table Storage Format Selection
Table Partition Usage
Extension Usage
Cold Data Backup
Statistics and Space Maintenance
FAQs
Tencent Cloud TCHouse-P Policy
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us

Managing Data

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-11-27 15:29:17

Inserting Data

1. Insert data corresponding to the column name.
INSERT INTO products (name, price, product_no) VALUES ('cheese', 99, 1);
2. Insert data in the order of the column names defined in the table.
INSERT INTO products VALUES(2, 'chesse', 99);
3. Insert multiple data records at once.
INSERT INTO products VALUES (3, 'a', 1), (4, 'b', 2), (5, 'c', 3);
4. Import data through an external table as instructed in Using External Table.
5. Import data from TencentDB via extensions as instructed in Importing External Data.
6. Insert data by using the COPY command. You need to log in to the database system, select the database, create the corresponding table, and use COPY to insert the data from the specified filename into tablename with the specified delimiter ,. The command is as follows:
COPY tablename FROM 'filename' WITH DELIMITER ',';

Updating Data

Update the data in the column corresponding to the row that satisfies the WHERE condition to the specified value as shown below:
UPDATE products SET price = 10 where product_no = 3;

Deleting Data

Delete the row that satisfies the WHERE condition as shown below:
DELETE FROM products where price = 3;
Delete all data in the table as shown below:
DELETE FROM products;

Querying Data

Access the database as instructed in Accessing Data Warehouse and query data as shown below:
1. Enter the specified database, for example, test:
\\c test;
2. Create the test table.
create table test(a1 int);
3. Insert the data.
insert into test values(3),(4);
4. Query the data.
select * from test;

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan