NEW
Font size
WorksheetsSQL and databases
Total questions: 10
Worksheet time: 5mins
What do the letters in CRUD stand for?
Create Read Update Delete
Craft Run Upload Database
Create Run Unrun Data
Crunch Read Uptime Downtime
Which statement is used to extract data from a database?
EXTRACT
GET
OPEN
SELECT
To remove a record from a table, which SQL statement would you use?
REMOVE
DELETE
CANCEL
ERADICATE
What's one solid reason for us to use databases instead of just storing stuff in a variable on the server?
If the server goes down, we won't lose all our data--our data will persist between sessions
A database is a more compact way of storing the information
Accessing information from a database is faster than accessing information from a variable
It's a toss-up, really--they're both good ways of storing information
Using which word allows you to specify that MORE THAN ONE condition must be met in a query?
OR
WHERE
AND
SELECT
I want to create a table in my table named "actors" with two columns: "name" and "age." What statement will do this?
CREATE TABLE actors (name TEXT, age INTEGER);
CREATE actors WITH COLUMNS (name, age);
CREATE DATABASE actors WITH COLUMNS (name TEXT, age INTEGER);
CREATE actors (name, age): TABLE, TEXT, INTEGER;
I want to add the actor "Brad Pitt" (aged 56) to my table "actors." Which statement will do this?
INSERT INTO actors VALUES ("Brad Pitt", 56);
INSERT "Brad Pitt" AND 56 INTO actors;
UPDATE age = 56 WHERE name = "Brad Pitt";
CREATE ENTRY ("Brad Pitt", 56) IN TABLE actors;
I want to select EVERY column and entry in my "actors" table. How can I do that?
SELECT * FROM actors;
SELECT age FROM actors;
SELECT * FROM actors WHERE age > 30;
SELECT name, age FROM actors WHERE age < 30;
I want to select all columns in my "actors" table for all actors older than 30. How can I do that?
SELECT * FROM actors;
SELECT age FROM actors;
SELECT * FROM actors WHERE age > 30;
SELECT name, age FROM actors WHERE age < 30;
Which aggregate function would I want to use to see which actor in my table is the oldest?
SUM
MAX
GROUP BY
WHERE
