Cassandra General Induction

Source: Internet
Author: User
Tags cassandra

Clear all the data in the table

Truncate Falcon_gps;

TRUNCATEAccepts a argument for the column family name, and permanently removes all data from said column family.

Query Cassandra a table an empty how many rows of records

Select COUNT (*) from Falcon_gps;

Bulk Import data

BEGIN BATCH USING Consistency QUORUM and TTL 8640000 INSERT into users (KEY, password, name) VALUES (' User2 ', ' [email prot Ected] ', ' second user ') UPDATE users SET password = ' Ps22dhds ' WHERE KEY = ' user2 ' INSERT into users (KEY, password) VALUE S (' User3 ', ' [email protected] ') DELETE name from the users WHERE key = ' User2 ' INSERT into users (key, password, name) VALUES (' User4 ', ' [email protected] ', ' Andrew ') APPLY BATCH;

Cassandra General Induction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.