SQL Flashcards
What command is used when choosing fields to read from?
SELECT
, for multiple fields
What command is used to choose which table to read/write data?
FROM
What command is used for conditional selection?
WHERE
AND/OR if multiple conditions
What symbol means all?
*
What condition would only take names starting with a?
WHERE name LIKE ‘A%’
How do you remove records?
DELETE FROM table
WHERE condition
How do you create new records?
INSERT INTO table (field1, 2…)
VALUES (1,2,3…)
How do you delete an entire field?
DROP COLUMN fieldname
How do you delete an entire table?
DROP TABLE tablename
How do you link tables?
JOIN table2 on
table1.key = table2.key
What is the order of commands when selecting data in relational databases?
SELECT
FROM
JOIN
WHERE
What is the % wildcard in sql?
however many characters, can be 0, used for LIKE command