Previous Page
Next Page

5.8. Review Questions

  1. What are functions?

  2. What are aggregate functions? Give examples of aggregate functions. What is another term for an aggregate function?

  3. What are row-level functions? Give examples of row-level functions.

  4. Is COUNT an aggregate function or a row-level function? Explain why. Give at least one example of when the COUNT function may come in handy. Does the COUNT function take nulls into account?

  5. Is AVG an aggregate function or a row-level function?

  6. What is the NULLIF function? Explain.

  7. How are ties handled in SQL Server?

  8. How does the DISTINCT function work?

  9. Are string functions (for example, SUBSTRING, RIGHT, LTRIM) aggregate functions or row-level functions?

  10. What is the SUBSTRING function used for?

  11. What is the CHARINDEX function used for?

  12. What function would you use to find the leftmost characters in a string?

  13. What are the LTRIM/RTRIM functions used for?

  14. What function would produce the output in all lowercase?

  15. What function would you use to find the length of a string?

  16. What characters or symbols are most commonly used as wildcard characters in SQL Server ?

  17. What is the concatenation operator in Server SQL 2005?

  18. What does the YEAR function do?

  19. What does the MONTH function do?

  20. What does the GEtdATE function do?

  21. What will the following query produce in SQL Server ?

        SELECT ('.....'+ names) AS [names]
        FROM Employee
    

  22. Does Server SQL allow an expression like COUNT(DISTINCT column_name)?

  23. How is the ISNULL function different from the NULLIF function?

  24. What function would you use to round a value to three decimal places?

  25. Which functions can the WITH TIES option be used with?

  26. What clause does the WITH TIES option require?

  27. What is the default date format in SQL Server ?

  28. How do dates have to be entered in Server SQL 2005?

  29. What function is used to convert between data types?

  30. What function is useful for formatting numbers?

  31. What function is useful for formatting dates?


Previous Page
Next Page