Insert, Select & Delete Data...

use firstkeyspace;

// Insert Data into Table
insert into firsttable(subject, mark) values('history', '70');

// Select Data
select * from firsttable;
 subject | mark
---------+------
 history |   70

(1 rows)

// Delete a Column
delete mark from firsttable where subject='history';
cqlsh:firstkeyspace> select * from firsttable;

 subject | mark
---------+------
 history | null

(1 rows)

// Delete an entire row
delete from firsttable where subject='history';
cqlsh:firstkeyspace> select * from firsttable;

 subject | mark
---------+------

(0 rows)

No comments:

Post a Comment