SQL Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does SQL stand for?

A

Structured Query Language

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

True or False: SQL is a programming language used for managing relational databases.

A

True

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

Fill in the blank: The command used to retrieve data from a database is called _____.

A

SELECT

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

What is the basic syntax for a SELECT statement?

A

SELECT column1, column2 FROM table_name;

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

Which SQL command is used to insert new records into a table?

A

INSERT INTO

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

True or False: The DELETE command can be used to remove rows from a table.

A

True

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

What is the purpose of the WHERE clause in SQL?

A

To filter records based on specified conditions.

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

Multiple Choice: Which of the following is used to update existing records in a table? A) MODIFY B) UPDATE C) CHANGE

A

B) UPDATE

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

What is the syntax for creating a new table in SQL?

A

CREATE TABLE table_name (column1 datatype, column2 datatype, …);

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

Fill in the blank: To remove a table from a database, you use the _____ command.

A

DROP TABLE

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

True or False: SQL is case-sensitive.

A

False

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

What does the ORDER BY clause do?

A

It sorts the result set in either ascending or descending order.

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

What is the primary key in a database table?

A

A unique identifier for each record in a table.

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

Multiple Choice: Which SQL function is used to count the number of rows in a SELECT query? A) COUNT() B) SUM() C) TOTAL()

A

A) COUNT()

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

What is the purpose of the JOIN clause in SQL?

A

To combine 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