SQL Database Creation · Module 6

Transact-SQL Statements - Quiz

Self-study assessment

Basic Elements of Transact-SQL Statements Quiz

Each question is worth one point. Some questions ask you to select the best answer, others ask you to select all the correct answers. To receive credit for questions asking for all the correct answers, you must select all the correct answers and only the correct answers.
1. Which keyword would you use to assign a static value to the @LoopCounter variable?
Please select the best answer.
  A. UPDATE
  B. RETURN
  C. SET
  D. ASSIGN

2. Which keyword would you use if you wanted to cycle through Transact-SQL statements until specific conditions return TRUE or FALSE?
Please select the best answer.
  A. WHILE
  B. GO
  C. BEGIN
  D. GOTO

3. What keyword do you use to indicate to SQL Server that you wish to use a variable in your Transact-SQL procedures?
Please select the best answer.
  A. VARIABLE
  B. USE
  C. DECLARE
  D. SELECT


View the reference answer — self-assessment only