1. Learn
  2. /
  3. Courses
  4. /
  5. Writing Functions and Stored Procedures in SQL Server

Connected

Exercise

DECLARE a TABLE

Let's create a TABLE variable to store Shift data and then populate it with static values.

Instructions

100 XP
  • Use DECLARE to create a TABLE variable named @Shifts
  • The @Shifts table variable should have the following columns - StartDateTime and EndDateTime - both of datetime data type.
  • Populate the table variable with the values '3/1/2018 8:00 AM' and '3/1/2018 4:00 PM'.