Font size
WorksheetsSQL Server Management Studio Quiz
Total questions: 85
Worksheet time: 47mins
Which of the following components of SQL Server Management Studio (SSMS) provides a tree-like interface for managing database objects such as tables, views, and stored procedures?
Query Editor
Object Explorer
Template Explorer
Solution Explorer
To perform a backup of a database in SSMS, which command would you most likely execute in the Query Editor?
BACKUP LOG
CREATE DATABASE
BACKUP DATABASE
RESTORE DATABASE
Which of the following is used to manage security and permissions for a user within a specific database?
Server Roles
Database Users
Logins
Endpoints
In the Query Editor, what is the keyboard shortcut to execute the selected T-SQL query or the entire script if nothing is selected?
F5
Ctrl + S
Ctrl + C
F1
When troubleshooting a performance issue in a stored procedure, which of the following tools within SSMS would be most helpful for visualizing the execution plan of the query?
SQL Server Profiler
Management Studio Activity Monitor
Database Mail
The Actual Execution Plan feature
What is the term for a set of step-by-step instructions designed to solve a problem or complete a task?
(a)
How can an algorithm be visually represented using geometric shapes and arrows to show the logical flow of a program?
(a)
What type of attribute is represented by a dashed oval in an ER diagram and is derived from another attribute?
(a)
What is the symbol used to denote a decision statement in a flowchart, where the answer is typically a binary choice?
(a)
What is the name of the attribute in an ER diagram that uniquely identifies each entity in an entity set, represented by an oval with an underline?
(a)
What is the name for the association between two entity types, graphically represented by a diamond shape in an ER diagram?
(a)
What is the term for a type of attribute that can have more than one value for a given entity, and is depicted by a double oval?
(a)
What is the concept in an ER model that defines the maximum number of times an entity of one set can participate in a relationship set?
(a)
What is the symbol used at the beginning and end of a flowchart to indicate the program's start and end points?
(a)
What is an organized collection of data, typically stored electronically, that is managed by a software system?
(a)
Which of the following is the primary purpose of a flowchart?
a. To write the code for a program.
b. To provide a written, text-based description of an algorithm.
c. To visually represent the logical flow of an algorithm using symbols.
d. To compile and execute a program.
In an Entity-Relationship (ER) diagram, what does a diamond shape represent?
a. An attribute.
b. An entity set.
c. A relationship set.
d. A composite attribute.
What is the defining characteristic of a "derived attribute" in an ER diagram?
a. It can have multiple values for a single entity.
b. It is an attribute that uniquely identifies an entity.
c. Its value can be calculated from other related attributes.
d. It is a grouping of other simple attributes.
When designing an algorithm using a top-down approach, what is the initial step?
a. Writing the detailed code for each sub-problem.
b. Breaking down the main problem into smaller, manageable sub-problems.
c. Testing and debugging the complete algorithm.
d. Defining the input and output variables.
In a flowchart, the decision symbol (diamond) typically leads to which of the following?
a. A single output path.
b. A loop that repeats indefinitely.
c. Two or more alternative paths based on a condition.
d. The end of the program.
What does SQL stand for?
a) Simple Query Language
b) Structured Query Language
c) Sequential Query Logic
d) Standardized Question Language
Which organization standardized SQL in 1986?
a) ISO
b) IEEE
c) ANSI
d) W3C
Which SQL command is used to add new records to a table?
a) ADD INTO
b) INSERT INTO
c) CREATE RECORD
d) UPDATE
What is the correct syntax to create a new database named "DB_School"?
a) CREATE DB_School DATABASE;
b) MAKE DATABASE DB_School;
c) CREATE DATABASE DB_School;
d) DATABASE CREATE DB_School;
Which keyword is used to define a column as a primary key in a CREATE TABLE statement?
a) UNIQUE
b) PRIMARY
c) KEY
d) PRIMARY KEY
What is the correct syntax to insert a student record into tbl_Student?
a) INSERT INTO tbl_Student (SID, SLastName) VALUES (10120, 'Castro');
b) ADD RECORD tbl_Student (SID, SLastName) VALUES (10120, 'Castro');
c) INSERT tbl_Student (SID, SLastName) SET (10120, 'Castro');
d) UPDATE tbl_Student (SID, SLastName) WITH (10120, 'Castro');
Which SQL command removes an entire database?
a) DELETE DATABASE
b) REMOVE DATABASE
c) DROP DATABASE
d) ERASE DATABASE
What data type would you use for a column storing student last names?
a) int
b) varchar(255)
c) boolean
d) float
What is the purpose of the VALUES clause in an INSERT statement?
a) To specify which columns to update
b) To define the data being inserted
c) To filter records
d) To sort the results
Which SQL command creates a new table?
a) MAKE TABLE
b) CREATE TABLE
c) NEW TABLE
d) DEFINE TABLE
Which SQL command creates a new table?
MAKE TABLE
CREATE TABLE
NEW TABLE
DEFINE TABLE
What does the ORDER BY clause do?
Filters records
Sorts the result set
Groups records
Deletes duplicates
How do you sort prices in descending order?
ORDER BY price ASC
ORDER BY price HIGH
ORDER BY price DESC
SORT BY price DOWN
Which operator filters records based on multiple conditions where all must be true?
OR
AND
NOT
XOR
What does SELECT TOP 3 * FROM products do?
Returns the first 3 columns
Returns the cheapest 3 products
Returns the first 3 records
Returns the last 3 records
Which query retrieves products in 'Electronics' OR 'Home Appliances'?
SELECT * FROM products WHERE category = 'Electronics' AND category = 'Home Appliances'
SELECT * FROM products WHERE category = 'Electronics' OR category = 'Home Appliances'
SELECT * FROM products WHERE category IN ('Electronics', 'Home Appliances')
Both b and c
What does the NOT operator do?
Inverts a condition
Combines conditions
Sorts results
Limits rows
Which query selects products NOT in 'Electronics' with price < 100?
SELECT * FROM products WHERE NOT category = 'Electronics' OR price < 100
SELECT * FROM products WHERE category != 'Electronics' AND price < 100
SELECT * FROM products WHERE NOT (category = 'Electronics' AND price < 100)
Both a and b
How do you sort by category (ascending) and then price (descending)?
ORDER BY category ASC, price DESC
SORT BY category UP, price DOWN
ORDER BY category, price DESC
Both a and c
Which query shows 'Office Furniture' OR (NOT 'Electronics' AND price > 100)?
SELECT * FROM products WHERE category = 'Office Furniture' OR (NOT category = 'Electronics' AND price > 100)
SELECT * FROM products WHERE (category = 'Office Furniture' OR NOT category = 'Electronics') AND price > 100
SELECT * FROM products WHERE category <> 'Electronics' AND price > 100 OR category = 'Office Furniture'
Both a and c
What does SELECT TOP 3 * FROM products ORDER BY price DESC return?
The 3 cheapest products
The 3 most expensive products
The first 3 products added
Random 3 products
Which SQL command retrieves data from a table?
FETCH
SELECT
GET
RETRIEVE
What does SELECT DISTINCT Country FROM tbl_Employee do?
Returns all countries, including duplicates
Returns only unique countries
Returns the first country alphabetically
Counts the number of countries
Which clause filters records in a SELECT statement?
FILTER BY
WHERE
HAVING
GROUP BY
How do you update an employee's country to 'South Africa' where EmployeeID = 1001?
MODIFY tbl_Employee SET Country = 'South Africa' WHERE EmployeeID = 1001
UPDATE tbl_Employee SET Country = 'South Africa' WHERE EmployeeID = 1001
EDIT tbl_Employee Country = 'South Africa' FOR EmployeeID = 1001
CHANGE tbl_Employee Country TO 'South Africa' IF EmployeeID = 1001
What does DELETE FROM tbl_Employee WHERE EmployeeName = 'Petterson' do?
Removes all employees
Deletes only employees named 'Petterson'
Updates 'Petterson' to NULL
Renames 'Petterson'
Which query selects only employees from 'South Korea'?
SELECT * FROM tbl_Employee HAVING Country = 'South Korea'
SELECT * FROM tbl_Employee WHERE Country = 'South Korea'
SELECT * FROM tbl_Employee FILTER Country = 'South Korea'
SELECT * FROM tbl_Employee FOR Country = 'South Korea'
What is the purpose of the SET keyword in SQL?
To filter rows
To define columns to update
To group data
To sort results
Which command removes all rows from a table (without deleting the table)?
DROP TABLE
TRUNCATE TABLE
REMOVE ALL
CLEAR TABLE
How do you select only LName and City from tbl_Employee?
SELECT LName, City FROM tbl_Employee
GET LName, City FROM tbl_Employee
RETRIEVE LName AND City FROM tbl_Employee
EXTRACT LName, City FROM tbl_Employee
What happens if you omit the WHERE clause in an UPDATE statement?
Only the first row is updated
No rows are updated
All rows are updated
The statement fails
Does SQL stand for "Structured Query Language"?
YES
NO
MAYBE
Is INSERT INTO used to delete records from a table?
YES
NO
MAYBE
Can you use CREATE DATABASE to make a new database?
YES
NO
MAYBE
Does DROP DATABASE permanently remove a database?
YES
NO
MAYBE
Is varchar(255) a valid data type for storing names?
YES
NO
MAYBE
Does SELECT DISTINCT return duplicate values?
YES
NO
MAYBE
Can the WHERE clause be used in an UPDATE statement?
YES
NO
MAYBE
Does DELETE FROM table_name remove all rows from a table?
YES
NO
MAYBE
Is SELECT * FROM tbl_Employee a valid SQL query?
YES
NO
MAYBE
Does the WHERE clause in a DELETE statement prevent accidental deletion of all rows?
YES
NO
MAYBE
What is the term for a unique string of characters that verifies a user's identity when logging into accounts?
(a)
What do we call the practice of protecting systems, networks and data from digital attacks?
(a)
What is the name for malicious software designed to harm or exploit computer systems?
(a)
What do we call the trail of data you leave behind when using the internet?
(a)
Name the logo.
(a)
Name the missing label on the image shown.
(a)
What is the name of the integrated development environment (IDE) commonly used for .NET programming?
(a)
What term describes the ability to find, evaluate, use and share information using digital technologies?
(a)
Complete name of your teacher
(a)
Which of the following is the most effective way to identify a phishing email?
The sender's email address is misspelled or doesn't match the company's official domain.
The email is addressed to a general recipient, like 'Dear Customer'.
The email requests a password change.
The email has a familiar company logo.
What is the markup language used for creating the structure and content of a web page?
(a)
What is the styling language used to control the visual appearance of a web page, such as colors, fonts, and layout?
(a)
Which programming language is used to add interactivity and dynamic behavior to a web page, such as handling button clicks or changing content?
(a)
What term describes the part of web development that focuses on the user-facing side of a website, including the design and interactive elements?
(a)
To add new data into a table named Employees, you would use the (a) command.
To create a new table in the database, the (a) TABLE statement is used.
The (a) command is used to remove a row of data from a table.
To change the data in an existing record, you use the (a) command.
To sort the results of a query in ascending order, you use the (a) keyword.
To sort query results in descending order, you use the (a) keyword.
The (a) operator is used to reverse the meaning of a condition.
Name the device
(a)
Name the device
(a)
To combine two or more conditions where all must be true, you use the (a) operator.
