Home > Databases > Quizzes > Transact-SQL (T-SQL) Quiz
Transact-SQL (T-SQL) Quiz
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 19% Most missed: “You need to find all students that are not on the 'Chemistry Cats' team. Which q…”

Transact-SQL (T-SQL) MCQs For LinkedIn Skill Assessments.

T-SQL is an extension to the SQL used to interact with relational databases. 

Transact-SQL (T-SQL) Quiz
Time left 00:00
25 Questions

1. What role does 'inventory' play?
tsql
select bookid, boooktitle, bookauthor,quantityonhand from inventory.books;
2. Which answer is a possible result of the sequence of commands below?
tsql
DECLARE @UniqueID uniqueidentifier = NEWID();
SELECT @UniqueID AS Result;
3. What is the result of this query?
tsql
SELECT 1 / 2 AS Result;
4. 'select * from dbo.books' here 'dbo' is a schema and the inventory is also schema. If we'd like to specify a database we should use 'db_name.schema_name.table_name' What is the result of an 'INNER JOIN' between table1 and table2?"
5. The result of a 'CROSS JOIN' between a table with 4 rows, and one with 5 rows, will give with \_ rows.
6. How many bytes of storage does the int data type consume?
7. You need to find all students that are not on the 'Chemistry Cats' team. Which query does NOT work for this task?
8. Review the 'CREATE TABLE' statement below. Which option, when placed in the blank space, ensures that the BookISBN column will not contain any duplicate values?
tsql
CREATE TABLE Books (
BookID int PRIMARY KEY,
BookISBN char(13) NOT NULL _____,
BookTitle nvarchar(100) NOT NULL
);
9. Which is the best approach to update the last name of the student Donette Figgins to Smith
10. To select a random student from the table, which statement could you use?
11. Which query shows the first name, department, and team of all students with the two lowest points?
12. Given a table with the following structure, which query will not return the lowest grade earned by any student?
tsql
CREATE TABLE Students (
StudentName varchar(50),
Grade int
);
13. Which is the right query to change the name of the Philosophy Pandas team to the Philosophy Parrots?
14. Which answer is NOT a type of table index?
15. What is the result of this query?
tsql
SELECT 'abc\
def' AS Result;
16. The keywords 'AND', 'IN', 'LIKE', and between all belong to a category called what?
17. Given a table with the following structure, which query returns all student names with the highest grade?
tsql
CREATE TABLE Students (
StudentName varchar(50),
Grade int );
18. You need to remove all data from a table name Products. Which query fully logs the removal of each record?
19. You need to create a simple database backup in the server's 'Z:\Backups' directory. Which query should you use?
20. What is the result of this query?
tsql
SELECT 123+'123' AS Result;
21. What is the problem with this code?
tsql
DECLARE @Counter int;
SET @Counter = 1;
WHILE @Counter > 0
BEGIN
SET @Counter = @Counter +1;
END;
22. What result is returned after executing the following commands?
tsql
DECLARE @MyVariable int;
SET @MyVariable = 1;
GO
SELECT @MyVariable;
23. To remove all of the content from the Students table but keep the schema, which statement should you use?
24. What is an example of a DDL command in SQL?
25. Which option—when placed in the blank space—establishes the PersonlD column as the primary key for the table with a nonclustered index?
sql
CREATE TABLE People (
PersonID int NOT NULL,
PersonName nvarchar(50),
_______
);