
上QQ阅读APP看书,第一时间看更新
Inserting and reading data
To insert data into the table, run the following command:
INSERT INTO personal_info (id, name, dob) VALUES ( 1 , 'Alice' , '02-25-1954' );
This will insert a record for a user named Alice whose date of birth is 02-25-1954 and has been assigned the id 1. To read the data from the table, run the following query:
SELECT * FROM personal_info WHERE id = 1;
You should get an output that looks like this:
Voila! You have created your first keyspace and table, inserted a record, and queried the record back.