MS SQL Server – 14 – TSQL Functions MCQ

14 – TSQL Functions MCQ

Best of luck!

1 / 25

1. What is the primary purpose of SQL Server’s aggregate functions?

2 / 25

2. Which SQL Server aggregate function calculates the average value of a numeric column?

3 / 25

3. What is the result of applying the COUNT function to a column in SQL Server?

4 / 25

4. Which SQL Server aggregate function returns the sum of all values in a numeric column?

5 / 25

5. What is the purpose of the MAX function in SQL Server?

6 / 25

6. Which SQL Server aggregate function calculates the total number of rows in a result set or a specific column?

7 / 25

7. In SQL Server, what does the SUM function return when applied to a column containing NULL values?

8 / 25

8. What is the primary purpose of SQL Server’s scalar functions?

9 / 25

9. Which SQL Server scalar function is used to convert a value from one data type to another?

10 / 25

10. In SQL Server, which scalar function can be used to extract a portion of a string?

11 / 25

11. What is the primary purpose of the CONCAT function in SQL Server?

12 / 25

12. Which SQL Server scalar function is used to remove leading and trailing spaces from a string?

13 / 25

13. In SQL Server, which scalar function is used to format date and time values?

14 / 25

14. Which SQL Server scalar function can be used to round a numeric value to the nearest integer?

15 / 25

15. What does the ROUND function in SQL Server do when rounding a value to a specified number of decimal places?

16 / 25

16. Which SQL Server scalar function can be used to find the length of a string?

17 / 25

17. In SQL Server, which scalar function can be used to convert a string to lowercase?

18 / 25

18. What is the purpose of the UPPER function in SQL Server?

19 / 25

19. Which SQL Server scalar function is used to extract the year from a date or datetime value?

20 / 25

20. In SQL Server, which scalar function can be used to extract the month from a date or datetime value?

21 / 25

21. What is the primary purpose of the DATEPART function in SQL Server?

22 / 25

22. Which SQL Server scalar function is used to add or subtract a specified number of days from a date?

23 / 25

23. What does the DATEDIFF function in SQL Server do?

24 / 25

24. In SQL Server, which scalar function can be used to get the current date and time?

25 / 25

25. Which SQL Server scalar function is used to generate a globally unique identifier (GUID)?

Your score is

0%