SQL Notes

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:46 PM on 12/10/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

What is the standard language for storing, manipulating, and retrieving data in databases?

SQL (Structured Query Language)

2
New cards

What does RDBMS stand for?

Relational Database Management System.

3
New cards

Are SQL keywords case-sensitive?

No!

4
New cards

What does the SELECT statement do?

Extracts Data From Database.

5
New cards

What is the purpose of the DISTINCT keyword in SQL?

It is used to return only distinct values.

6
New cards

What SQL syntax would you use to count the number of different countries in a table?

SELECT COUNT(DISTINCT column_name) FROM table_name;

7
New cards

What is the function of the SELECT INTO statement?

It copies data from one table into a new table.

8
New cards

What does the INSERT INTO SELECT statement do?

It copies data from one table and inserts it into another table.

9
New cards

What does the CASE expression do in SQL?

It goes through conditions and returns a value when the first condition is met.

10
New cards

What does the WHERE clause do in SQL?

It is used to filter records.

11
New cards

What does the GROUP BY statement do in SQL?

It groups rows that have the same values into summary rows.

12
New cards

What type of JOIN returns all records from the left table and the matched records from the right table?

LEFT JOIN.

13
New cards

What is the purpose of the UNION operator in SQL?

It combines the result set of two or more SELECT statements.

14
New cards

What does the NOT NULL constraint do?

Ensures that a column cannot have a NULL value.

15
New cards

What is the use of the SUM() function in SQL?

It returns the total sum of a numerical column.

16
New cards

What does the IS NULL operator do?

Used to test for empty (NULL) values.

17
New cards

What is the purpose of the AUTO_INCREMENT feature?

It generates a unique number automatically when a new record is inserted into a table.

18
New cards

What do Microsoft SQL Server and MS Access use for auto-increment features?

IDENTITY keyword for SQL Server and AUTOINCREMENT keyword for MS Access.

19
New cards

What is a stored procedure in SQL?

A prepared SQL code that you can save for reuse.