SQL Flashcards

1
Q

What command is used when choosing fields to read from?

A

SELECT
, for multiple fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What command is used to choose which table to read/write data?

A

FROM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command is used for conditional selection?

A

WHERE
AND/OR if multiple conditions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What symbol means all?

A

*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What condition would only take names starting with a?

A

WHERE name LIKE ‘A%’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you remove records?

A

DELETE FROM table
WHERE condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you create new records?

A

INSERT INTO table (field1, 2…)
VALUES (1,2,3…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you delete an entire field?

A

DROP COLUMN fieldname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you delete an entire table?

A

DROP TABLE tablename

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you link tables?

A

JOIN table2 on
table1.key = table2.key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the order of commands when selecting data in relational databases?

A

SELECT
FROM
JOIN
WHERE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the % wildcard in sql?

A

however many characters, can be 0, used for LIKE command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly