SQL Flashcards
What does SQL stand for?
Structured Query Language
True or False: SQL is used to communicate with databases.
True
Fill in the blank: The command used to retrieve data from a database is called _____ .
SELECT
What is the purpose of the WHERE clause in SQL?
To filter records based on specified conditions.
Which SQL command is used to add new records to a database?
INSERT
True or False: The SQL command UPDATE is used to delete records from a database.
False
What is the primary key in a database?
A unique identifier for each record in a table.
What does the GROUP BY clause do in SQL?
It groups rows that have the same values in specified columns into summary rows.
Which SQL keyword is used to sort the result set?
ORDER BY
What is a foreign key?
A field in one table that uniquely identifies a row of another table.
Fill in the blank: The SQL command used to remove records from a table is _____ .
DELETE
What is the purpose of the JOIN clause in SQL?
To combine rows from two or more tables based on a related column.
Which SQL command is used to modify existing records in a database?
UPDATE
True or False: The DISTINCT keyword is used to return only unique values.
True
What does the COUNT function do in SQL?
Returns the number of rows that match a specified criterion.
What is normalization in database design?
The process of organizing data to reduce redundancy and improve data integrity.
What is the function of the HAVING clause?
To filter records after an aggregation has been performed.
Fill in the blank: In SQL, the _____ command is used to create a new table.
CREATE TABLE
What is a subquery?
A query nested inside another query.
True or False: SQL is a case-sensitive language.
False
What does the term ‘data type’ refer to in SQL?
A classification that specifies which type of value a column can hold.
Which SQL function is used to find the maximum value in a set?
MAX()
What is a view in SQL?
A virtual table based on the result of a SELECT query.
Fill in the blank: The SQL command to change the structure of an existing table is _____ .
ALTER TABLE