SQL Flashcards

(11 cards)

1
Q

What is SQL used for

A

declerative language to manipulate databases

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

SELECT

A

collect fields from a given table

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

FROM

A

specify which table the info comes from

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

WHERE

A

specify the search criteria

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

BETWEEN

A

between two values like BETWEEN 10 AND 20

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

ORDER BY

A

Specifies if you want it ascending or descending.
ORDER BY DatePublished Desc

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

JOIN

A

combines rows from multiple tables from a common field

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

CREATE

A

Make new databases.
CREATE TABLE TableName
(
Attribute1 INTEGER NOT NULL, PRIMARY KEY,
Attribute2 VARCHAR(20) NOT NULL,
)

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

ALTER

A

Used to add, delete or modify columns in a table.

delete: ALTER TABLE TableName
DROP COLUMN AttributeX

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

INSERT INTO

A

INSERT INTO (column1, column2, …)
VALUES (value1, value2, …)

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

UPDATE

A

update a record.
UPDATE TableName
SET column1 = value1
WHERE columnX = value

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