SQL queries Flashcards

(17 cards)

1
Q

SELECT

A

The SELECT statement is used to select data from a database.

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

WHERE

A

The WHERE clause is used to filter records that match a certain
condition

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

ORDER BY

A

The ORDER BY keyword is used to sort the result-set in
ascending (ASC) or descending (DESC) order.

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

IN

A

The IN operator allows you to specify multiple values in a WHERE
clause, shorthand for multiple OR conditions.

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

COUNT

A

number of rows returned based on your query

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

MIN/MAX

A

minimum/maximum value of column

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

AVG

A

average value of a column

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

GROUP BY

A

The GROUP BY statement groups rows that have the
same values into summary rows, usually used with aggregate
functions (count, min/max, avg)

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

HAVING

A

Same as WHERE, but used for aggregate functions

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

INNER JOIN

A

selects records that have matching values in different tables.

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

SUBQUERIES

A

A subquery is a query nested within another query

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

CREATE

A

Used to create a new table in a
database

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

DROP

A

Used to drop (delete) a table
from a database

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

ALTER

A

Used to add/delete/modify columns
in an existing table

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

INSERT

A

INSERT INTO is used to add a
new record to a table

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

UPDATE

A

UPDATE modifies an existing
record in a table

17
Q

DELETE

A

DELETE will delete existing
records in a table