Stellar Study Cards

Learn SQL Commands with Flashcards | Simplify Database Management

50 Total Cards in This Deck

SQL Commands Flashcards

Arrow keys or swipe to navigate cards

1 / 50 Total
Basics of SQL

What is the purpose of the SELECT statement in SQL?

2 / 50 Total
Basics of SQL

What is the syntax for inserting data into a table using the INSERT statement?

3 / 50 Total
Basics of SQL

What does the UPDATE statement do in SQL?

4 / 50 Total
Basics of SQL

What is the DELETE statement used for?

5 / 50 Total
Basics of SQL

What is the difference between DELETE and TRUNCATE?

6 / 50 Total
Data Definition Language (DDL)

What is the purpose of the CREATE statement in SQL?

7 / 50 Total
Data Definition Language (DDL)

What does the ALTER statement do in SQL?

8 / 50 Total
Data Definition Language (DDL)

What is the syntax for the DROP statement in SQL?

9 / 50 Total
Data Definition Language (DDL)

How is the CREATE DATABASE command used?

10 / 50 Total
Data Definition Language (DDL)

What is the difference between DROP and TRUNCATE?

11 / 50 Total
Data Manipulation Language (DML)

What is the purpose of the INSERT statement in SQL?

12 / 50 Total
Data Manipulation Language (DML)

How can you insert data into a table by copying from another table?

13 / 50 Total
Data Manipulation Language (DML)

What does the UPDATE statement do in SQL?

14 / 50 Total
Data Manipulation Language (DML)

How can you update multiple columns in a single SQL query?

15 / 50 Total
Data Manipulation Language (DML)

What is the purpose of the DELETE statement in SQL?

16 / 50 Total
Data Manipulation Language (DML)

How do you delete all rows from a table without removing its structure?

17 / 50 Total
Data Manipulation Language (DML)

How can you return the rows affected by an UPDATE statement?

18 / 50 Total
Data Manipulation Language (DML)

How do you insert data with default values for some columns?

19 / 50 Total
Data Manipulation Language (DML)

How can you delete rows based on a join condition?

20 / 50 Total
Data Manipulation Language (DML)

How can you use the INSERT ON CONFLICT or REPLACE statement?

21 / 50 Total
Data Querying

What is the purpose of the WHERE clause in a SELECT query?

22 / 50 Total
Data Querying

How do you use the GROUP BY clause in a query?

23 / 50 Total
Data Querying

What is the difference between INNER JOIN and LEFT JOIN?

24 / 50 Total
Data Querying

How do you filter grouped data using the HAVING clause?

25 / 50 Total
Data Querying

What is the purpose of the FULL JOIN?

26 / 50 Total
Data Querying

How can you use a subquery in the SELECT clause?

27 / 50 Total
Data Querying

How do you retrieve unique rows using SELECT?

28 / 50 Total
Data Querying

What is a CROSS JOIN, and when is it used?

29 / 50 Total
Data Querying

How do you filter rows using multiple conditions?

30 / 50 Total
Data Querying

How can you sort query results in SQL?

31 / 50 Total
Data Control Language (DCL)

What is the purpose of the GRANT statement in SQL?

32 / 50 Total
Data Control Language (DCL)

What does the REVOKE statement do in SQL?

33 / 50 Total
Data Control Language (DCL)

How can you grant all privileges on a database to a user?

34 / 50 Total
Data Control Language (DCL)

How can you check the permissions granted to a user?

35 / 50 Total
Data Control Language (DCL)

What is the difference between GRANT and REVOKE?

36 / 50 Total
Transaction Control Language (TCL)

What is the purpose of the COMMIT statement in SQL?

37 / 50 Total
Transaction Control Language (TCL)

What does the ROLLBACK statement do in SQL?

38 / 50 Total
Transaction Control Language (TCL)

What is a SAVEPOINT in SQL, and how is it used?

39 / 50 Total
Transaction Control Language (TCL)

How can you set a transaction to begin explicitly in SQL?

40 / 50 Total
Transaction Control Language (TCL)

What happens if a transaction is not committed or rolled back?

41 / 50 Total
Common SQL Functions

What does the COUNT() function do in SQL?

42 / 50 Total
Common SQL Functions

How is the SUM() function used in SQL?

43 / 50 Total
Common SQL Functions

What is the purpose of the AVG() function in SQL?

44 / 50 Total
Common SQL Functions

How is the MAX() function used in SQL?

45 / 50 Total
Common SQL Functions

What does the MIN() function do in SQL?

46 / 50 Total
Common SQL Functions

How do you concatenate strings in SQL?

47 / 50 Total
Common SQL Functions

How can you extract the year from a date column in SQL?

48 / 50 Total
Common SQL Functions

What is the purpose of the NOW() function in SQL?

49 / 50 Total
Common SQL Functions

How can you find the length of a string in SQL?

50 / 50 Total
Common SQL Functions

What does the ROUND() function do in SQL?