Simple Queries for Execute Apache Cassendra

Create KeySpace 1:

CREATE KEYSPACE appsonekeyspace WITH REPLICATION = { ‘class’ : ‘SimpleStrategy’, ‘replication_factor’ : 1 };

Use KeySpace 2:

use appsonekeyspace;

Create table in Keyspace 3:

CREATE TABLE users (
user_id int PRIMARY KEY,
user_name text,
password text
);

Insert Some Values into Table 4:

INSERT INTO users (user_id, user_name, password) VALUES (1745, ‘Ashoka’, ‘test’);
INSERT INTO users (user_id, user_name, password) VALUES (1744, ‘Murali’, ‘demo’);
INSERT INTO users (user_id, user_name, password) VALUES (1746, ‘Bhat’, ‘sample’);

Query Simple SELECT 4:

SELECT * FROM users;

Advertisements

About ashokabhat

I am a C,C ,JAVA,Adobe Flex,.NET Programmer Currently working as a Software Developer
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s