SQL Flashcards

Learn SQL Syntax (34 cards)

1
Q

SQL Term

A

Description

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

SELECT

A

Used to select specific columns from a table.

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

FROM

A

Specifies the table to retrieve data from.

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

WHERE

A

Filters records based on specified conditions.

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

GROUP BY

A

Groups rows that share a property to apply aggregate functions.

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

HAVING

A

Filters groups based on aggregate results (used with GROUP BY).

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

LIMIT

A

Limits the number of rows returned by a query.

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

ORDER BY

A

Sorts the result set by one or more columns.

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

JOIN

A

Combines rows from two or more tables based on a related column.

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

INNER JOIN

A

Returns records that have matching values in both tables.

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

LEFT JOIN

A

Returns all records from the left table and matched records from the right table.

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

RIGHT JOIN

A

Returns all records from the right table and matched records from the left table.

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

FULL JOIN

A

Returns all records when there is a match in either left or right table.

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

INSERT INTO

A

Inserts new rows into a table.

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

UPDATE

A

Updates existing records in a table.

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

DELETE

A

Deletes records from a table.

17
Q

DISTINCT

A

Selects distinct (unique) values in a column.

18
Q

BETWEEN

A

Filters values within a specific range.

19
Q

IN

A

Filters values that match any value in a list.

20
Q

LIKE

A

Filters values using pattern matching (e.g., wildcards).

21
Q

IS NULL

A

Checks for NULL (missing) values.

22
Q

IS NOT NULL

A

Checks for non-NULL values.

23
Q

UNION

A

Combines the result sets of two or more SELECT statements.

24
Q

EXISTS

A

Checks if a subquery returns any records.

25
ALTER TABLE
Modifies an existing table (e.g., add or drop columns).
26
DROP TABLE
Deletes a table from the database.
27
CREATE TABLE
Creates a new table in the database.
28
TRUNCATE
Empties all records from a table without deleting the table.
29
COUNT()
Counts the number of rows in a table.
30
SUM()
Returns the total sum of a numeric column.
31
AVG()
Returns the average value of a numeric column.
32
MIN()
Returns the minimum value in a column.
33
MAX()
Returns the maximum value in a column.
34
ROUND()
Rounds a numeric value to a specified number of decimal places.