Demo
This commit is contained in:
parent
e6002df18e
commit
72013ac9d3
6 changed files with 158 additions and 22 deletions
19
demo-2.sql
19
demo-2.sql
|
|
@ -1,9 +1,13 @@
|
|||
-- Create the people table
|
||||
-- (not using the "users" name so that you can use this file in the same
|
||||
-- DB instance as demo-3.sql)
|
||||
|
||||
CREATE TABLE people (id UUID PRIMARY KEY, first_name STRING, surname STRING);
|
||||
|
||||
-- Insert entries into people
|
||||
|
||||
SELECT * FROM people;
|
||||
|
||||
INSERT INTO people (id, first_name, surname) VALUES (u1, "Ranice", "Hardman");
|
||||
INSERT INTO people (id, first_name, surname) VALUES (u2, "Amara", "Fieldsend");
|
||||
INSERT INTO people (id, first_name, surname) VALUES (u3, "Stillmann", "Metzing");
|
||||
|
|
@ -1005,7 +1009,22 @@ INSERT INTO people (id, first_name, surname) VALUES (u998, "James", "Dinning");
|
|||
INSERT INTO people (id, first_name, surname) VALUES (u999, "Alvina", "Varcoe");
|
||||
INSERT INTO people (id, first_name, surname) VALUES (u1000, "James", "Postance");
|
||||
|
||||
|
||||
INSERT INTO people (id, first_name, surname) VALUES (u1001, "James", "Postance");
|
||||
|
||||
-- SELECT commands for people
|
||||
|
||||
SELECT * FROM people;
|
||||
|
||||
INSERT INTO people (id, first_name, surname) VALUES (u1001, "Foo", "Bar");
|
||||
|
||||
SELECT * FROM people WHERE first_name = "James";
|
||||
|
||||
CREATE INDEX PeopleName ON people (first_name);
|
||||
|
||||
SELECT * FROM people WHERE first_name = "James";
|
||||
|
||||
|
||||
DELETE FROM people;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue