stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
SQL Training Recap Flashcards | StudBud
Explore
/
SQL Training Recap
SQL Training Recap
50 terms
·
StudBud Administration
·
27 plays
Imported from external platform
Flashcards
50 cards
F
Practice quiz
P
Host live
L
Questions
50
Answers
1
True or False: The SQL SELECT statement can only retrieve specific columns from a table.
True
False
2
What is the SQL command used to remove a foreign key constraint from a table?
ALTER TABLE
DROP FOREIGN KEY
FOREIGN KEY
REMOVE FOREIGN KEY
3
What does the SQL command "DELETE FROM table_name" do?
Deletes a specific row from a table.
Deletes a table from the da
tabase.Deletes all rows from a table.
Deletes a column from a table.
4
Which SQL command is used to add a foreign key constraint to a table?
ALTER TABLE
ADD FOREIGN KEY
CREATE CONSTRAINT
FOREIGN KEY
5
True or False: Float is a common data type used to represent decimal numbers with a fixed number of digits.
True
False
6
True or False: The CREATE statement in SQL is used to define the structure and properties of a new table.
True
False
7
What is the purpose of the "Results" pane in SSMS?
To view execution plans
To manage server connections
To display query results
To debug stored pro
8
True or False: Integer is a common data type used to represent whole numbers.
False
True
9
Which feature in SSMS allows you to view and edit the structure of a database table?
Object Explorer
Template Explorer
Query Editor
Activity Monitor
10
True or False: The ORDER BY clause in SQL is used to sort the retrieved data in ascending or descending order.
True
False
11
The relationship between 2 tables where each row in one table can b related to multiple rows in the other table?
One-to-One
One-to-Many
Many-to-One
Many-to-Many
12
True or False: Date is a common data type used to represent dates and timestamps.
True
False
13
Which SQL command is used to remove a column from an existing table?
DELETE COLUMN
REMOVE COLUMN
DROP COLUMN
ERASE COLUMN
14
True or False: Boolean is a common data type used to represent true or false values.
False
True
15
Which SQL command is used to add a primary key constraint to a table?
ALTER TABLE
MODIFY TABLE
ADD CONSTRAINT
PRIMARY KEY
16
Which SQL statement is used to modify the structure of a table?
CHANGE TABLE
ALTER TABLE
MODIFY TABLE
UPDATE TABLE
17
Which tool in SSMS allows you to import and export data to and from a database?
Activity Monitor
Import and Export Wizard
Query Designer
Object Expl
18
True or False: The CREATE statement in SQL is used to create a new table in a database.
False
True
19
What does the SQL command "TRUNCATE TABLE table_name" do?
Deletes a column from a table.
Deletes a table from the database.
Deletes all rows from a table.
Deletes a specific row from a table.
20
How can you add a new row to a table in SQL?
ADD ROW INTO table_name (value1, value2, ...);
UPDATE table_name SET value1, value2, ...;
CREATE ROW IN table_name (value1, value2, ...);
INSERT INTO table_name VALUES (value1, value2, ...);
21
True or False: The CREATE statement in SQL is used to modify existing data in a table.
False
True
22
True or False: The SQL SELECT statement is used to retrieve data from a database.
True
False
23
Which SQL command is used to insert new rows into a table?
ADD ROW
UPDATE ROW
CREATE ROW
INSERT INTO
24
What does the SQL command "ALTER TABLE table_name ADD COLUMN column_name data_type" do?
Adds a new column to an existing table.
Drops a column from a table.
Updates a specific column in a table.
Renames a table.
25
What is the SQL command used to remove a primary key constraint from a table?
DROP CONSTRAIN
PRIMARY KEY
REMOVE CONSTRAINT
ALTER TABLE
26
True or False: The GROUP BY clause in SQL is used to group the retrieved data based on one or more columns.
False
True
27
Which SQL command is used to add a new column to an existing table?a) ALTER TABLE
ALTER TABLE
UPDATE TABLE
INSERT COLUMN
ALTER TABLE
28
What is the primary purpose of SQL Server Management Studio (SSMS)?
To monitor server performance
All of the above
To write and execute SQL queries
To manage database objects and settings
29
True or False: The SQL SELECT statement cannot be used to perform mathematical calculations on retrieved data.
False
True
30
Which SQL command is used to retrieve data from a relational database?
UPDATE
DELETE
INSERT
SELECT
31
Which SQL statement is used to update data in a table?
REPLACE
SET
MODIFY
UPDATE
32
Which SQL statement is used to update multiple columns in a table?
UPDATE
MODIFY
ALTER
SET
33
Which SQL command is used to change the name and data type of a column in a table?
MODIFY COLUMN
CHANGE COLUMN
RENAME COLUMN
UPDATE COLUMN
34
True or False: The CREATE statement in SQL is used to create a new database.
True
False
35
True or False: The WHERE clause in SQL is used to filter the data based on specific conditions.
False
True
36
Which SQL statement is used to change the data type of a column in a table?
UPDATE COLUMN
CHANGE COLUMN
MODIFY COLUMN
ALTER COLUMN
37
What does the SQL command "UPDATE table_name SET column_name = new_value WHERE condition" do?
Adds a new column to an existing table.
Updates a specific column in a table.
Deletes a specific row from a table.
Renames a table.
38
True or False: The CREATE statement in SQL is used to create a new index on a table.
True
False
39
What does the term "normalization" refer to in the context of relational databases?
The process of organizing data into tables and column
The process of creating relationships between tab
The process of eliminating data redundancy
The process of securing the database against unauthorized access
40
True or False: The SQL SELECT statement can be used to retrieve data from multiple tables using JOIN operations.
True
False
41
True or False: The LIMIT clause in SQL is used to limit the number of rows returned by a query.
False
True
42
Which term describes a collection of related data organized in tables?
Tuple
Schema
Relationship
Database
43
Which keyboard shortcut in SSMS is used to execute a selected query?
Ctrl + R
Ctrl + E
Ctrl + S
F5
44
What is the SQL command used to delete an entire table?a) REMOVE TABLE
REMOVE TABLE
DELETE TABLE
DROP TABLE
ERASE TABLE
45
What does the SQL command "ALTER TABLE table_name DROP PRIMARY KEY" do?
Removes the primary key constraint from a table.
Drops a specific column from a table.
Renames a table.
Deletes the entire table.
46
True or False: The DISTINCT keyword in SQL is used to eliminate duplicate rows from the retrieved data.
True
False
47
True or False: The SQL SELECT statement cannot b used 2 retrieve data based on pattern matching using the LIKE operator.
True
False
48
True or False: String is a common data type used to represent text or characters.
False
True
49
What is the purpose of a primary key in a relational database?
To ensure data integrity and uniqueness
To define the structure of a table
To retrieve data
To establish relationships between tables
50
How can you change the name of a table in SQL?
RENAME TABLE table_name TO new_name;
ALTER TABLE table_name RENAME TO new_name;
UPDATE TABLE table_name SET name = new_name;
CHANGE TABLE table_name RENAME TO new_name;