DBMS SQL DML

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

DML (Data Manipulation Language)

A subset of SQL used to retrieve, insert, update, and delete data in a database.

2
New cards

SELECT

Retrieves data from one or more tables and returns it in a result set.

3
New cards

INSERT

Adds new records (rows) into a table.

4
New cards

UPDATE

Modifies existing data in a table.

5
New cards

DELETE

Removes records from a table.

6
New cards

WHERE Clause

Filters rows based on a condition before they are retrieved or affected.

7
New cards

HAVING Clause

Filters grouped records (used after GROUP BY) based on aggregate conditions.

8
New cards

LIKE Operator

Used for pattern matching with wildcards such as % (any characters) and _ (single character).

9
New cards

ORDER BY

Sorts query results in ascending (ASC) or descending (DESC) order.

10
New cards

GROUP BY

Groups rows with the same values into summary rows for aggregate functions.

11
New cards

Aggregate Function

Functions like COUNT(), SUM(), AVG(), MAX(), and MIN() that compute a single value from multiple rows.

12
New cards

Wildcard %

Represents any sequence of characters in a string pattern. Example: 'A%' matches "Alice", "Aaron".

13
New cards

Wildcard _

Represents a single character in a pattern. Example: 'J_n' matches "Jan", "Jon".

14
New cards

DELETE vs TRUNCATE

DELETE removes specific rows (can use WHERE); TRUNCATE removes all rows quickly without logging.

15
New cards

INSERT INTO SELECT

Copies rows from one table into another table.

16
New cards

UPDATE with calculation

Example: UPDATE emp SET salary = salary * 1.1; increases salary by 10%.

17
New cards

DISTINCT keyword

Removes duplicate rows from query results.

18
New cards

BETWEEN

Tests whether a value lies within a range. Example: salary BETWEEN 5000 AND 10000.

19
New cards

IN Clause

Checks if a value matches any value in a list. Example: department_id IN (10, 20, 30).