From the course: Microsoft SQL Server 2019 Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Solution: Create tables with T-SQL commands - SQL Server Tutorial
From the course: Microsoft SQL Server 2019 Essential Training
Solution: Create tables with T-SQL commands
- [Instructor] In this challenge, we were tasked with creating a table to hold details about fitness classes for a local gym. We're given a list of requirements and we just need to make sure that the table that we create has columns that are appropriately structured for the given data that we want to insert into the table. Now, we're given this sample answer that has the insert statement down below, so we can see that it'll eventually add in three rows of information into the fitness class schedule. And we just need to make a table that will accommodate all of this data. All right, let me come up here to line number three and we'll get started with a create table statement. And the name of the table is going to be Fitness Class Schedule. Then we'll just open a parentheses and I'll move that closing parentheses down. And I'm going to add my semicolon at the very end right now just for good measure so that I don't forget it later. Okay, we'll come inside and we'll start filling in the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Understand the role of T-SQL1m 59s
-
(Locked)
Use the T-SQL editor6m 4s
-
(Locked)
Create a table with T-SQL5m 28s
-
(Locked)
Solution: Create tables with T-SQL commands3m 48s
-
(Locked)
Add data to a table3m 41s
-
(Locked)
Solution: Add data with T-SQL commands3m 3s
-
(Locked)
Retrieve records with SELECT3m 28s
-
(Locked)
Solution: Query data in a database2m 3s
-
(Locked)
Filter returned results with WHERE1m 51s
-
(Locked)
Sort records2m 42s
-
(Locked)
Solution: Filter and sort data with a query4m 22s
-
(Locked)
Delete records from a table3m 32s
-
(Locked)
Update records in a table3m 4s
-
(Locked)
Solution: Remove and update records in a table6m 22s
-
(Locked)
Join related tables5m 1s
-
(Locked)
LEFT JOIN and RIGHT JOIN2m 16s
-
(Locked)
Solution: Query information from related tables5m 43s
-
(Locked)
Remove a table from the database4m 6s
-
(Locked)
-
-
-
-
-
-